Effacer les filtres
Effacer les filtres

Performing a robust fft of a sinus

1 vue (au cours des 30 derniers jours)
TheBeginner
TheBeginner le 20 Août 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?

Réponses (0)

Catégories

En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by