How to optimise fft?
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Sebastien Dupertuis
le 31 Juil 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 commentaires
Voir également
Catégories
En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!