How do you find the spectrogram in Matlab?
s = spectrogram( x ) returns the Short-Time Fourier Transform (STFT) of the input signal x . Each column of s contains an estimate of the short-term, time-localized frequency content of x . The magnitude squared of s is known as the spectrogram time-frequency representation of x [1].
How do you find the frequency spectrum in Matlab?
In MATLABĀ®, the fft function computes the Fourier transform using a fast Fourier transform algorithm. Use fft to compute the discrete Fourier transform of the signal. y = fft(x); Plot the power spectrum as a function of frequency.