num_iden_gross0.m
来自「基于GM算法和QR分解实现的稳健奇异值分解算法」· M 代码 · 共 19 行
M
19 行
function [t,scale]=num_iden_gross0(y)
%Identify the gross errors'numbers of an observational vector y
%
t=zeros(1);
n=length(y);% Compute the size of the vector y
mean_y=mean(y);%Compute the mean of the vector y
v=y-mean_y;% Compute the residuas of the vector y
scale=median(v.^2)^0.5*1.4826*(1+5/(n-1));% Compute the robust scale parameter, i.e. the standard error, of the vector y
m=0;
for i=1:n
m=m+1;
if abs(v(i))>scale*2.5
t(m)=i;% Identify the location number of the gross error;
else
t(m)=0;
end
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?