Performing a robust fft of a sinus
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!