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 のデフォルトのスペクトログラム関数によって行われます。ここで説明します。