📄 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;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -