MATLAB: Spectrogram

spectrogramstft

I have a simple sine signal (data) with a frequency of 6Hz, lasting 30 seconds. When I perform a spectrogram of data, I should get a time-frequency plot where 6Hz is the solid line, instead I get 0.1Hz, what am I doing wrong?
Do you have a webinar that shows how to perform spectrograms, STFT, etc?

Best Answer

Frequency sampling ( Fs ) - this is all about. You should specify correct Fs - try spectrogram in this usage:
S=spectrogram(x,window,noverlap,nfft,fs)
Related Question