In the example provided in the help documentation for the FFT command, there seems to be an extra factor of 2 that the spectrum is multiplied by before being plotted.
The snippet of code is provided below:
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;f = Fs/2*linspace(0,1,NFFT/2);% Plot single-sided amplitude spectrum.
plot(f,2*abs(Y(1:NFFT/2))) title('Single-Sided Amplitude Spectrum of y(t)')
Best Answer