I am getting incorrect amplitude of my signal post FFT (90% error) and it does not improve after applying any of the window functions prior to FFT. After reading a number of articles, I believe FFT overlapping might improve the accuracy. However, I am not sure how to do it in Matlab. Please could anyone shed some light on that. I tried using spectrogram but I keep getting error on input X to be double precision vector.
Here is an example without performing FFT overlapping:
L = 1024; %signal length Fs = 1000; %sampling frequency t = (0:L-1)'/Fs; NFFT = 2^nextpow2(L); x = 11*sin(2*pi*250*t); J = flattopwin(L); JX = x(:).*J(:); P= fft(JX,NFFT)/L; M= 2*abs(P(1:NFFT/2+1)); f = Fs/2*linspace(0,1,NFFT/2+1); plot(f,M)
The amplitude observed from the plot is approximately 2.4 at 250Hz which is much lesser than the actual amplitude, 11. Is there any reason for the significant reduction of the amplitude on FFT of a windowed signal?