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

Illustration
Oliviawilliams02 - 2020-09-10T12:16:03+00:00
Question: How can I plot spectrogram without using function "spectrogram"?

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 answered . 2025-11-20

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);


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!