In using spectrogram, what is the difference between specifying option 'power' and 'psd'?

6 ビュー (過去 30 日間)
Jonathan
Jonathan 2016 年 7 月 25 日
回答済み: Greg Dionne 2017 年 5 月 2 日
I ran two tests, with identical input data, first with:
[s,f,t] = spectrogram(y1, hann(windowsz), noverlap, nfft, fs,'yaxis','power','reassigned');
then with:
[PSDs,f,t] = spectrogram(y1, hann(windowsz), noverlap, nfft, fs,'yaxis','psd','reassigned');
I then checked to see if the results where the same:
if s == PSDs
a = 'SAME'
end
and the result was 'SAME'
So, what do options 'psd' and 'power' do?

回答 (2 件)

Star Strider
Star Strider 2016 年 7 月 25 日
The best I can do is to quote the documentation:
  • Omitting spectrumtype, or specifying 'psd', returns the power spectral density.
  • Specifying 'power' scales each estimate of the PSD by the equivalent noise bandwidth of the window. The result is an estimate of the power at each frequency. If the 'reassigned' option is on, the function integrates the PSD over the width of each frequency bin before reassigning.
  1 件のコメント
Jonathan
Jonathan 2016 年 7 月 25 日
Ok, I removed the 'reassigned' option from both spectrogram statements and I still get identical results. Any further ideas? Thanks.

サインインしてコメントする。


Greg Dionne
Greg Dionne 2017 年 5 月 2 日
The first output is always the (unmodified) STFT.
The 'power' and 'psd' and 'reassign' flags only affect the later outputs (most notably Pxx).

カテゴリ

Find more on Time-Frequency Analysis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by