How can I plot spectrogram without using function "spectrogram"?

O
Oliviawilliams02 · Sep 10, 2020 · 2.3K views
Question
Hello I've got a signal which depends on three variables. I want to plot a draft like draft using function "spectrogram" (2D draft with three axes, third axis is displayed with color). I don't want to use this function, because before plotting it processing a signal, but I have alredy processed signal.
Expert Answer
Profile picture of Neeta Dsouza
Neeta Dsouza PhD Expert
Answered Nov 20, 2025

To replicate the plotting behavior of spectrogram.m, use surf()

 

   z = randn(100,100);
   t = 1:100;
   x = 1:100;
   surf(t,x,abs(z),'EdgeColor','none');   
   axis xy; axis tight; colormap(jet); view(0,90);
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!