How to optimise fft?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I was trying to do fast fourier transform after applying a hanning window on my input signal (600 points). I was using code "Xk=fft(signal.*window1);" and it will return me 600x1 array as an outpout. However, I found that it took more than 100us to complete this line of code. Is there any way I can optimise 'fft()' function?
Many thanks.
0 Kommentare
Antworten (1)
Sebastien Dupertuis
am 31 Jul. 2019
Hi Jingwen,
One solution to optimize the execution of some MATLAB code/function is to use the MATLAB Coder to generate a MEX (MATLAB Executable). If the implementation of the function is already optimal, you will not get much improvement, and this is the case with the fft function.
Another solution could be to use the Parallel Computing toolbox, but in the case of the fft function it will not help as its implementation is already multi-threaded.
I have attached an example with MEX generation that is directly linked to your application and you can see that you cannot better improve the execution time of the fft function.
Thanks,
Sebastien
0 Kommentare
Siehe auch
Kategorien
Mehr zu Transforms finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!