将Matlab频谱图的值缩放到实际范围 [英] To scale values from Matlab's spectrogram to real range
本文介绍了将Matlab频谱图的值缩放到实际范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我跑步
spectrogram(data, 64, 60, 256, 2, 'yaxis');
我知道
我想获得0到180 Hz的范围,而不是0到1的归一化范围. 我可以通过以下方式更改轴
I want to get range from 0 to 180 Hz, instead of normalised range from 0 to 1. I can change axis by
axis([0 450 0 180])
但它不会更改值.
我跑步失败
spectrogram(180 .* data, 64, 60, 256, 2, 'yaxis');
如何将范围从标准化范围缩放到实际范围?
推荐答案
x轴应为频率.您需要知道data
的采样率fs
(是2吗?).则频率范围将为(0:63)/64*fs
The x-axis should be frequency. You need to know the sampling rate fs
(is it 2 ?) of data
. Then the frequency range will be (0:63)/64*fs
实际上,您可以在频谱图功能中获得频率输出:
Actually you can get the frequency output in the spectrogram function:
[B,F,T]=spectrogram(data,64,60,256,2); % if fs = 2 in your case
F
是频率范围.
这篇关于将Matlab频谱图的值缩放到实际范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文