At frequency f >10^6, the program is very slow to calculate the FFT. Please let me know if there is a faster method. Thank you. Regards HDaniel
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
hani daniel
am 4 Mär. 2016
Bearbeitet: Walter Roberson
am 4 Mär. 2016
% fft_sinewave_1.m
Fs=1*10^7;
t = 0:1/Fs:1;
v = 1;
f = 10^6;
y = v*sin(2*pi*f*t);
nfft=1024;
Y = fft(y,nfft);
Y=Y(1:nfft/2);
mx=abs(Y);
f=(0:nfft/2-1)*Fs/nfft;
plot(f,mx);
grid on;
0 Kommentare
Akzeptierte Antwort
John D'Errico
am 4 Mär. 2016
There is no magic to be had. You can alway make any problem sufficiently large that is starts to take appreciable time to run. Had you a bigger, faster computer, you would have asked the same question, just with a bigger problem.
So, get a cup of coffee and relax. Read a book while it does its work. Or try to solve smaller problems. Or find a bigger, faster computer.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!