0

I have produced spectrogram of a signal using matlab like this:

[S,F,T,P]=spectrogram(...);%I have used my desired parameters

and I have ploted the result :(the spectrogram of whole signal)

the spectrogram of the whole signal

my question is that now I want to plot a part of this spectrogram which stands for a specific window of my signal in time domain (say from sample number 900 - 920 in my signal vector). And I want to know how to do it using the out put of the spectrogram function(the S, F , T , P).

thank you

Shirin Feiz
  • 73
  • 1
  • 6

1 Answers1

2

A simple way to do it would be to use xlim:

xlim([1 1.5]);

to plot the [1 1.5] second window, or

xlim(T([900 920]));

if you prefer to specify indexes in your time vector.

Ratbert
  • 5,463
  • 2
  • 18
  • 37