Complexity order of fft in matlab

3 Ansichten (letzte 30 Tage)
Ziwen Gu
Ziwen Gu am 27 Okt. 2023
Kommentiert: Ziwen Gu am 28 Okt. 2023
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 Kommentare
David Goodmanson
David Goodmanson am 28 Okt. 2023
Bearbeitet: David Goodmanson am 28 Okt. 2023
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 am 28 Okt. 2023
Uhhhhhhh, thanks a lot, goodmanson, may you have a plesant day.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by