matlab,plot,spectrum,spectrogram

A simple plot(f) tries to plot frequency vector, isn' t it? Check the code below: X_mags = abs(fft(signal)); bin_vals = [0 : N-1]; fax_Hz = bin_vals*fs/N; N_2 = ceil(N/2); [a, g] = lpc(signal,N); [h, f] = freqz(b, a, N, fs); figure, hold on, plot(f, 20*log10(abs(h)), 'r'); plot(fax_Hz(1:N_2), 20*log10(X_mags(1:N_2))); title('Frequency Spectrum');...

matlab,matlab-figure,spectrogram

From the MATLAB documentation: [S,F,T] = spectrogram(...) returns a vector of frequencies, F, and a vector of times, T, at which the spectrogram is computed. S, F and T are exactly what you need. The T variable contains the times at which the wav file contains frequencies F with the...

matlab,spectrogram,denormalized

Assuming you have a license for the MATLAB signal processing toolbox, you can use the function spectrogram. You find details on this function on the MATLAB help page. The syntax is S = spectrogram(x,window,noverlap,nfft,fs); where fs is the sampling frequency. If you want to plot a spectrogram of a signal...

matlab,signal-processing,spectrogram

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....