"Spectrogram" - does it produce spectral amplitudes, or can it ONLY produce power spectral densities/amplitudes?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kathryn Dorn
am 10 Mai 2019
Kommentiert: Kathryn Dorn
am 10 Mai 2019
Hello, and thank you in advance to anyone who can answer this -
I'm running "spectrogram" to try to obtain spectral amplitudes (NOT power spectral densities). The help page implies that the [S,F,T] = ... version of the function produces spectral amplitudes (by taking the STFT); however, one MATLAB answer that I came across (from 2016) says that the [S,F,T] = ...version produces power spectral densities instead. (I have read the help page and realize that different calls to the function do produce PSDs or power spectra estimates; I don't want those.) So, am I obtaining amplitude or power spectral values?
Thank you!
-Kathryn Dorn
0 Kommentare
Akzeptierte Antwort
Bjorn Gustavsson
am 10 Mai 2019
In my version of matlab I have to go down halfway through the help text - which is very goog to read - to find_:
[S,F,T,P] = spectrogram(...) P is a matrix representing the Power
Spectral Density (PSD) of each segment.
So, in order to get the power spectral density you need to ask for the fourth output argument. Another way to find out is to look at what S is:
whos S
If that returns information that S is complex then it cannot be a PSD, which has to be real. Maybe it is possible to get a purely real S, but that seems difficult to achieve.
HTH
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Parametric Spectral Estimation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!