How can I calculate the mean-squared spectrogram instead of PSD spectrogram?

T
Timothy · Mar 19, 2021 · 2.2K views
Question
I use the SPECTROGRAM function on a signal as shown below:     T = 0:0.001:2; X = chirp(T,100,1,200,'q'); spectrogram(X,128,120,128,1E3); However, I would like to plot the mean-squared or MS spectrum instead of Power Spectral Density (PSD).
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Aug 15, 2026
This feature is not available in the Signal Processing Toolbox in MATLAB 7.3 (R2006b).
 
To work around this issue, spectrum objects are available that allow you to calculate the mean-squared spectrum.
 
For example, you can perform the following in the MATLAB command prompt to view the MS spectrum:
Fs=1000;

t=0:1/Fs:.3;

x=cos(2*pi*t*200)+randn(size(t));

Hs=spectrum.periodogram;

msspectrum(Hs,x,'Fs',Fs)
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!