使用互信息去识别emd中的虚假分量,怎么出现互信息大于1?
代码如下:
fs=500;
N=1000;
n=0:N-1;
t=n/fs;
x=sin(2*pi*3*t)+0.4*sin(2*pi*11*t)+0.9*sin(2*pi*25*t);
imf=emd(x);
[m,n]=size(imf);
for i=1:m
subplot(m,1,i);
plot(t,imf(i,:));
end
%求各分量的相关系数与互信息
for i=1:m;
R=corrcoef(imf(i,:),x);
xg(i)=abs(R(1,2));
end
for i=1:m
mi(i,:)=mutinf(imf(i,:), x);
end
% 选择本征模分量
R=size(Imf,1);
[nImf,SigLen]=size(Imf);
xCor=[];
norm_Sig=(Sig-mean(Sig))/std(Sig);
for r=1:R
norm_Imf=(Imf(r,:)-mean(Imf(r,:)))/std(Imf(r,:));
Coef=xcorr(norm_Sig,norm_Imf)/SigLen;
xCor=[xCor max(abs(Coef))];
end
k=find(xCor>max(xCor)/2);
Imfs=zeros(length(k),SigLen);
for t=1:length(k)
Imfs(t,:)=Imf(k(t),:);
end