Filter löschen
Filter löschen

Performing a robust fft of a sinus

1 Ansicht (letzte 30 Tage)
TheBeginner
TheBeginner am 20 Aug. 2013
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?

Antworten (0)

Kategorien

Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by