What is the mathematical relation between the output parameters S and P in the function definition of spectrogram in Signal Processing Toolbox 6.9 (R2008a)? I would like to know the mathematical relation between output parameters S and P in the spectrogram function.
John Williams answered .
2025-11-20
[S,F,T,P] = spectrogram(x,window,noverlap,F,fs)
P = Power of Signal/(fs*Power of the window) % where Power of the window = window'*window
T = 0:0.001:2; X = chirp(T,0,1,150); F = 0:.1:100; win = hamming(256); [S,F,T,P] = spectrogram(X,win,250,F,1E3,'yaxis');
Power of window = win'*win; Power of Signal = S.*conj(S)/Power of window; P = Power of Signal./Fs