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
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에 대해 자세히 알아보기

질문:

2019년 4월 2일

답변:

2019년 7월 31일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by