Complexity order of fft in matlab

조회 수: 2 (최근 30일)
Ziwen Gu
Ziwen Gu 2023년 10월 27일
댓글: Ziwen Gu 2023년 10월 28일
Hello everyone, I want to check the complecity order of fft is O(N*log(N) in matlab, so I ran the code below:
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
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
Ziwen Gu
Ziwen Gu 2023년 10월 28일
Uhhhhhhh, thanks a lot, goodmanson, may you have a plesant day.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by