如何求Hilbert能量谱
使用下载的工具包,hhspectrum()如何才能得到能量谱?
clear;
close all;
fs=1024; %fs为采样频率;
N=1024*2; %采样点数
t=1/fs:1/fs:(N/fs);
y1=2*sin(2*pi*10*t);
for k = 1:length(y1)
% if ((t(k) < 0.2) || (t(k) > 0.8))
if ((k<512)||(k>1024))
y1(1,k) = 0;
end
end
h = figure;
plot(t,y1);
saveas(h,'signal.bmp','bmp');
close(h);
y2=5*sin(2*pi*20*t);
y = y1 + y2;
save y_test.txt -ascii y;
imf = emd(y);
=size(imf);
h0 = figure;
for k = 1:ro
subplot(ro,1,k);
plot(imf(k,:));
end
y = imf;
=hhspectrum(y);
h2 = figure;
for k = 1:ro
for k1 = 1:length(fa(k,:))
if fa(k,k1)>0.4
fa(k,k1) =0;
end
end
subplot(ro,1,k);
plot(tt,1024*fa(k,:));
end 嗯 貌似论坛上目前只有时频谱和边际谱,而没有能量谱的讨论,以t为自变量同时做出频率谱和能量谱好象对信号分析也很好~
页:
[1]