Hello
I'm currently working on FFT on cosine and sine function. I want to get the FFT graph to be plotted. The graph of the FFT looks fine except that the value of the amplitude were a bit off.
The amplitude was suppose to be '1', however, at different frequency, the amplitude will change from 0.8 to 1.5.
The code looks like this: Fs=1000 t=0:1/Fs:1;
NFFT = 2^nextpow2(length(x)); y = fft(x,NFFT)/length(x); y = y(1:NFFT/2+1); my = 2*abs(y); f = Fs/2*linspace(0,1,NFFT/2+1);
plot(handles.freqdomain,f,my) xlabel('Frequency(Hz)') grid on
Any help is appreciated. Thanks in advance.
Best Answer