www.pudn.com > un_IMM_PDAF.zip > Create_Elipse.m
function ElipseHand = Create_Elipse(y,H,P,R)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create_Elipse - draws the Kalman covariance matrix volume in 2-D
% Input:
% y - the observation at time t
% H - the observation matrix
% P - the covariance matrix
% R - the observation covariance
% Output:
% ElipseHand - handle to the elipse object
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% paramater
VolFactor = 3; % sqrt(gamma);
t = 0:.1:2*pi+.1;
circle = [cos(t);sin(t)]*VolFactor;
S = H*P*H' + R;
[u,sing,v] = svd(S);
elipse = u*sing*circle;
figure(gcf);
%hold on;
ElipseHand = plot(elipse(1,:)+y(1), elipse(2,:)+y(2),'r');
%drawnow;
%hold off;