?? errell2.m
字號:
function [a,b,az]=errell2(C)% ERRELL2 Computes 2D error ellipse from covariance matrix.% Note: x & y represent north & south (opposite of% normal MatLab convention). Non-vectorized. See also% ERRELL3.% Version: 24 Jan 96% Useage: [a,b,az]=errell2(C)% Input: C - covariance matrix (2D)% Output: a - major semi-axis of error ellipse% b - minor semi-axis of error elilpse% az - azimuth of major axis (rad)if nargin~=1 error('Wrong number of input arguments');endif (nargout~=3) error('Wrong number of output arguments');end[V,D]=eig(C); % Eigenvalues & vectorsd=diag(D);inda=find(max(d)==d);indb=find(min(d)==d);a=sqrt(d(inda(1)));b=sqrt(d(indb(1)));az=atan2(V(2,inda(1)),V(1,inda(1)));
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -