?? emd5.m
字號:
%calculate each imf's autocorrelation coefficient,from which
%we can decide the num of imfs that currupted by heavy noise.
%that means we can utilize the autocorrelation coefficient to decide the
%noise order
function signal=emd5(x)
tic;%timing function.
if size(x,2)==1
x=x';
end
n=x;%give the value of n to x.
emd(n);%invoke the emd function to devite the signal into imfs.
a=ans;
imfnum=size(a,1)
i1=1;
while i1<=imfnum
r=a(i1,:);
%Treat adjacent imfs with autocorrelation function.
n=20;
i=length(r);
b=[];
for j=1:(i-n)
b(j)=r(j+n);
end
i=length(b);
m=1:i;
for j=1:n
b(i+j)=interp1(m,b,i+j,'spline');%utilize the cubic spline function to make up of the length of b to accord r.
m=1:i+j;
end
P=corrcoef(b,r);
P=abs(P(2,1));
if P>0.2
break;
else
i1=i1+1;
continue;
end
end
i1=min(i1,5)
signal=add(a,i1,imfnum);
autocorrelation(signal);
toc;
return;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -