I found there is great difference between the result of the fourier transform using directly integration and that using FFT.What's the reason?
??The FT using FFT
fp=1024; % FFT Point
fs=20; % Sampling frequency
t=0:1/fs:2;
y=sin(pi*t);
Y=abs(fft(y,fp))/fp;
f=fs*(0:fp/2)/fp;
plot(f,Y(1:fp/2+1))...