Azzera filtri
Azzera filtri

Performing a robust fft of a sinus

1 visualizzazione (ultimi 30 giorni)
TheBeginner
TheBeginner il 20 Ago 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?

Risposte (0)

Categorie

Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by