I am trying to understand how to interpret a spectrogram image plot: (1) what does the yellow band and its corresponding color code with a high positive value indicate? There are so many yellow bands in comparison to blue. The legend shows that the yellow bands have higher positive values, so is that higher frequency?

(2) I used the following code to generate the spectrogram. The X axis contains 50 data points because the method splits the signal into segments of length 50. I arbitrary used 10 into the spectrogram function. Is there a specific rule as to how to determine the number of points?

x(1) = rand;
for n = 1:500
    x(n+1) = 4*x(n)*(1-x(n));

specto=spectrogram(x,10,0,256); %using 256 fft points with no overlap




I'm assuming you're using Matlab. The Matlab function and its parameters are:


  1. The color indicates the power at a given frequency. Typically, this is given in dB. In your plot, the power is concentrated in the low frequencies a the bottom of the plot. The higher frequencies at the top of the plot have less power.

  2. The value of 10 you used is the width (number of samples) of your windowing function. It takes a vector of n samples and applies weights to the samples such that the ends of the vector taper to zero. This is done to limit leakage (a loss of frequency resolution/introduction of artificial frequencies) during the DFT process. You choose the width of your window according to the frequency resolution you desire (more samples give a finer frequency resolution).

I hope this helps.

| improve this answer | |
  • $\begingroup$ Thank you very much for your answer. Could you please clarify few points based on your answer?(1) the legend shows values 10 to -50...where the range $\pm 10 $ corresponds to yellow color. So does high power in low freq indicate more information is conveyed by lower freq? I mean what is useful? High freq or low freq? (2) more samples give finer freq resolution -- is that preferred and why $\endgroup$ – Sm1 Jul 15 at 3:27
  • $\begingroup$ You can extract different information from different frequencies. The zero frequency component tells you the average power in your signal. If you have a well defined peak at a certain frequency, it means that you have a strong periodic characteristic at that frequency. High frequencies tell you about rapid variations in your signal.This can be from the actual signal structure or from noise. Typically, you aim to have a frequency resolution that is high enough to extract meaningful information from the spectrogram, and simultaneously low enough to give you acceptable processing times. $\endgroup$ – Taha Moufid Jul 15 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.