create_elipse.m

来自「IMM PDAF跟踪滤波的程序」· M 代码 · 共 30 行

M
30
字号
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;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?