In the documentation - sepctrogram()
.
Question 1)s = spectrogram(signal)
and spectrogram(signal)
are two commands to plot the spectrogram. However, the variable s
is complex valued. I am unable to understand which output of the spectrogram
is used to generate the image plot?
Question 2) How to determine the best values of the parameters window
and noverlap
? Should noverlap
be 50% of the signal length (number of elements in the time series) or 90% etc? What if it is zero then what does it mean? My dataset has sampling time = 1sec. I remember reading somewhere that the window should be at least roughly twice as long as the period of the lowest frequency. So, for my case is w=2
since frequency = 1?
I was thinking of using pspectrum(signal,'spectrogram')
which outputs the spectrogram and use the output values as inputs to the spectrogram()
function. But again, I don't know which output values from pspectrum
can be used, if at all that is possible.