Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Graham
Posts:
20
Registered:
9/29/09


Simple FFT problem
Posted:
Feb 20, 2012 12:10 PM


Hello,
Could you please help me with a simple FFT problem? I just want to plot the FFT of a 1kHz sine wave...
% continous sine wave fs = 64000; t=0:1/fs:0.004; a = 0.5; f = 1000; y=a*sin(2*pi*f*t); figure(1); plot(t,y);
figure(2); plot(abs(fft(y)));
Why do I not get a spike at 1kHz? Surely fs is large enough!
Thanks :)



