MATLAB: FFT example on MATLAB help

fftMATLAB

Hi everybody, I am trying to learn FFT in MATLAB by understanding the example available in help file(<http://www.mathworks.co.uk/help/techdoc/ref/fft.html>). I don't know why in the line : Y = fft(y,NFFT)/L; the fft result is divided by L.
your help is apreciated

Best Answer

You don't need to divide it by L, it is purely a matter of scaling the result by a constant, which does not affect the shape of the spectrum, but really only affects the units of measure. The choice of scaling is largely a matter of convention rather than anything of significance.
Some people will disagree with this assessment and argue that the scaling does matter. The reality is that it depends to a large degree on your objectives and what you need to get from taking the FFT.