在Matlab中将值从Wigner-Ville分布缩放到实际范围 [英] To scale values from Wigner-Ville Distribution to real range in Matlab
问题描述
我通过使用时间频率工具箱
[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]之内.
The frequency should be within [0,180] Hz and time [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));
我认为这里的问题是初始化时间和频率窗口. 我正在尝试通过编辑参数的值来操纵两个轴.
I think the problem here is initialising the windows for time and frequency. I am trying to manipulate the both axis, by editing the values of the parameters.
由Matlab的默认频谱图功能完成的,具有相同数据但带有右标签轴的对应频谱图的讨论
A corresponding Spectrogram of the same data but with axis of right labels is, done by Matlab's default spectrogram function, discussion here:
推荐答案
如果您使用以下命令,我认为tfrwv
等效于spectrogram
.
I think tfrwv
is equivalent to spectrogram
if you use the following command.
时间间隔为t = 1/360
.
选择fs = 360.5
.
imagesc(T*t, F*fs, abs(B));
tfrwv
中有更多的峰,可能是因为窗口大小和重叠与您在spectrogram
中使用的不同.
There are more peaks in tfrwv
probably because the window size and overlap are different from what you used in spectrogram
.
结果
这篇关于在Matlab中将值从Wigner-Ville分布缩放到实际范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!