Performing a robust fft of a sinus

1 次查看(过去 30 天)
TheBeginner
TheBeginner 2013-8-20
Hi,
I want to perform a fourier transform near the Nyquist frequency. I plot in a loop the maximum of the FFT for an increasing length of the sinus.
However the result is really unstable, regarding to both the length of the sinus and the sinus frequency.
Fe = 400; %sampling frequency, Hz
F = 163; %sinus frequency, Hz
A = 26; %amplitude
for i=10 : 100
clear sinus, clear vect_temp, clear FFT, clear FFT_prime;
N = i*100;
vect_temp = (1/Fe:1/Fe:N/Fe); %s
sinus = A*sin(2*pi*F*vect_temp);
FFT = abs(fft(sinus))/ length(sinus); %FFT normalized
NFFT = 2^nextpow2(length(sinus));
FFT_prime = abs(fft(sinus,NFFT)) / length(sinus); %FFT normalized
hold on,
plot(N,max(FFT),'+');
plot(N,max(FFT_prime),'*r');
end
Any idea what's the problem?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by