简单介绍了,FFT的MATLAB实现,fs=100; N=128; n=0:N-1; t=n/fs; x=0.5*sin(2*pi*15*t)+2*sin(2*pi*40*t); y=fft(x,N); f=(0:length(y)-1)'*fs/length(y); mag=abs(y); stem(f,mag); title(‘N=128点’)