?? plterrel.m
字號:
function plterrel(xo,yo,C,s,ltype)% PLTERREL Plots an error ellipse on screen.% Note 1: x & y represent north & south (opposite of% normal MatLab convention). Note 2: use a square% aspect ratio for plot; i.e., use axis('square')% command. Non-vectorized.% Version: 18 Jan 96% Useage: plterrel(xo,yo,C,s,ltype)% Input: xo - x (north) origin of ellipse% yo - y (east) origin of ellipse% C - covariance matrix (2x2)% s - ellipse scale factor (default=1)% ltype - line type for error ellipse% (default=solid,red)% Output: Plotted error ellipse centred at (xo,yo)if nargin<3 error('Too few input arguements');endif nargin<4 s=1; % Define default scale factorendif nargin<5 ltype='-r'; % Define default color redenddt=0.1; % Angular resolutiont=[(0:dt:2*pi)';0];[V,D]=eig(C); % Eigenvalues & vectorsr=sqrt(diag(D)); % Length of axesx=s*r(1)*cos(t);y=s*r(2)*sin(t);xx=xo+[x y]*V(1,:)';yy=yo+[x y]*V(2,:)';plot(yy,xx,ltype); % Switch x (north) & y (east)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -