Yesterday is history, tomorrow is a mystery, but today is gift. That's why we called it the present. >>>>>>> 点此联系我

[Matlab] 短时傅里叶变换spectrogram函数

Matlab 文档:https://ww2.mathworks.cn/help/signal/ref/spectrogram.html#bultmx7-x

调用:[~,f,t,ps] = spectrogram(data,opt.window,opt.noverlap,freqRange(1):freqRange(2),sample_freq,'reassigned');

有两个细节:reassigned 解释如下:

[___] = spectrogram(___,'reassigned') reassigns each PSD or power spectrum estimate to the location of its center of energy. If your signal contains well-localized temporal or spectral components, then this option generates a sharper spectrogram.

示例:

openExample('signal/ReassignedSpectrogramOfQuadraticChirpExample')

这是我自己花了两张对比图,效果如下:

图1 无reassign选项

 

 图2 有reassign选项

 

posted @ 2020-12-13 21:25  virter  阅读(1852)  评论(0编辑  收藏  举报