Complexity order of fft in matlab
3 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone, I want to check the complecity order of fft is O(N*log(N) in matlab, so I ran the code below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1522971/image.png)
The expected ratio is 1 : 2.8 : 7.8 , which is far away from code's result.
Can anyone explain what is wrong?
2 件のコメント
David Goodmanson
2023 年 10 月 28 日
編集済み: David Goodmanson
2023 年 10 月 28 日
Hello ZG,
the elapsed times from toc will not totally agree with O(nlog(n)), but surely that expected ratio is not as extreme as 1 : 2.8 : 7.8 :
n = [1 2 4]*1e5;
n.*log(n)/(n(1)*log(n(1)))
ans = 1.0000 2.1204 4.4816
回答 (0 件)
参考
カテゴリ
Help Center および 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!