資源簡介
本代碼實現(xiàn)了wigner-ville與偽wigner-ville,平滑wigner-ville,cohn wigner-ville 的頻譜以及三維圖像
代碼片段和文件信息
clear?all;clc;
N=1000;
fs=2000;
n=0:N;
t=n*1/2000;
x1=cos(2*pi*200*t).*(t>=0?&?t<=0.8);
x2=cos(2*pi*50*t).*(t>=0.2?&?t<=1);
x=x1+x2;
x=(x-mean(x))/std(x1);??
figure(1);
plot(tx);
title(‘原始信號‘);
xlabel(‘時間?t‘);
ylabel(‘幅值?A‘);
grid?on;
x=(x-mean(x))/std(x1);
x=hilbert(x);
[tfrtf]=tfrwv(x‘1:NN);
figure(2);
contour(t/fsf(1:N)*fsabs(tfr));
xlabel(‘時間?t/s‘);
ylabel(‘頻率?f/Hz‘);
title(‘Wigner-Ville分布時頻圖‘);
grid?on
axis?([0?0.5?0?1000]);
figure(3);
mesh(t/fsf(1:N)*fsabs(tfr));
xlabel(‘時間?t‘);
ylabel(‘頻率?f‘);
zlabel(‘幅值?A‘);
title(‘三維Wigner-Ville分布時頻圖‘);
[tfr1t1f1]=tfrpwv(x‘1:NN);
figure(4);
contour(t1/fsf1(1:N)*fsabs(tfr1));
xlabel(‘時間?t/s‘);
ylabel(‘頻率?f/Hz‘);
title(‘偽Wigner-Ville分布時頻圖‘);
grid?on
axis?([0?0.
評論
共有 條評論