How to optimise fft?
古いコメントを表示
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.
回答 (1 件)
Sebastien Dupertuis
2019 年 7 月 31 日
0 投票
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
カテゴリ
ヘルプ センター および 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!