|
程序给你贴出来,自己研究吧
clc;clear
data=xlsread('matlab.xls');
x=(data(:,2));
x=(x-mean(x))';
fs=1/2e-6;
imf=emd(x);
emd_visu(x,1:length(x),imf);
% figure
% hua_fft(x,fs,1);xlim([0 5000]);
[A,fa,tt]=hhspectrum(imf);
[E,tt1,Cenf]=toimage(A,fa,tt,length(tt),2500);
%%%%%%%%%%%%%%图像滤波,对实测数据效果好些%%%%%%%%%%%%
q=fspecial('gaussian', 7, 0.6);
nsu=filter2(q, E);
nsu=filter2(q, nsu);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure
imagesc(tt,0:0.5*fs,nsu.^.5);colorbar;xlim([0 9000]);
% imagesc(tt,0:0.5*fs,E);colorbar;
ylabel('频率f/Hz')
set(gca,'YDir','normal')
xlabel('采样点数')
for k=1:size(E,1)%SIZE(X,1) returns the number of rows
bjp(k)=sum(E(k,:))*1/fs;
end
figure;plot(Cenf(1,:)*fs,bjp); |
评分
-
1
查看全部评分
-
|