errell2.m
来自「gps matlab 仿真程序(A collection of geodetic」· M 代码 · 共 25 行
M
25 行
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 + =
减小字号Ctrl + -
显示快捷键?