eemd分解后如何画时频图
x=load('E:\bearing\1797rpm_DE\0.txt');allmode=eemd(x,0.1,100);
fs=12000;N=length(x);
plot_hht_3d(allmode,N,fs,[-60,50]);
得到的图如下:
前面0-2哪去了?
plot_hht_3d的代码如下:
function plot_hht_3d(imf,numfreq,fs,ANGLE)
if nargin<3
fs=1;
ANGLE=[-37.5,30];
end
if nargin<4
if size(fs,2)>1
ANGLE=fs;
fs=1;
else
ANGLE=[-37.5,30];
end
end
N=size(imf,2);
=hhspectrum(imf);
=size(f);
MaxFreq=max(max(f));
MaxFreq=ceil(MaxFreq/0.5)*0.5;
if nargin<2
numfreq=512;
end
df=linspace(0,MaxFreq,numfreq);
Spectrum=zeros(numfreq,n);
Temp=f;
Temp=min(round((Temp/MaxFreq)*numfreq)+1,numfreq);
for k=1:m
for u=1:n
Spectrum(Temp(k,u),u)=Spectrum(Temp(k,u),u)+A(k,u);
end
end
df=df*fs;
figure
clf
mesh(tt,df,Spectrum);
set(gca,'XLim',);
xlabel('采样点数/n');
if fs==1
ylabel('归一化频率');
else
ylabel('频率/Hz');
end
zlabel('幅值');
title('三维联合时频图');
colormap jet;
shading interp;
view(ANGLE(1),ANGLE(2));
set(gca,'YLim',);
end
页:
[1]