我使用Time-Frequency Toolbox中的函数 tfrwv.m 运行
[B,T,F] = tfrwv(data, 1:length(data), length(data), 1);
B(1:130, :) = 0; % remove the duplicate part of the distribution
imagesc(T, F, abs(B));
colormap(hot);
xlabel('t [s]');
ylabel('f [Hz]');
我明白了
频率应在 [0,180] Hz 和时间 [0,2.5s] 内。
您如何将时间和频率缩放到实际值?
手册说
%TFRWV Wigner-Ville time-frequency distribution.
% [TFR,T,F]=TFRWV(X,T,N,TRACE) computes the Wigner-Ville distribution
% of a discrete-time signal X,
% or the cross Wigner-Ville representation between two signals.
%
% X : signal if auto-WV, or [X1,X2] if cross-WV.
% T : time instant(s) (default : 1:length(X)).
% N : number of frequency bins (default : length(X)).
% TRACE : if nonzero, the progression of the algorithm is shown
% (default : 0).
% TFR : time-frequency representation. When called without
% output arguments, TFRWV runs TFRQVIEW.
% F : vector of normalized frequencies.
%
% Example :
% sig=fmlin(128,0.1,0.4); tfrwv(sig);
%
我跑
[B,T,F] = tfrwv(data, 1:length(data), length(data), hamming(length(data)/10), hamming(length(data)/4));
我得到
Error using tfrwv
Too many input arguments.
Error in flow_wv (line 8)
[B,T,F] = tfrwv(data, 1:length(data), length(data),
hamming(length(data)/10), hamming(length(data)/4));
我认为这里的问题是初始化时间和频率的窗口。我试图通过编辑参数的值来操纵这两个轴。
由 Matlab 的默认频谱图函数完成的相同数据但具有正确标签轴的相应频谱图,在此处讨论: