📄 num_iden_gross0.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -