四點快速富利葉轉換(FFT)
更新日期: 2011年1月31日
注意: πr 是按 Shift EXP Shift Ans 2
程式 (70 bytes)
ClrMemory: ?→A: ?→B: ?→C: ?→D:
While M - 4: πr M÷2→X: A + B cos( X ) + C cos( 2X ) + D cos( 3X◢
- B sin( X ) - C sin( 2X ) - D sin( 3X◢ 1M+: WhileEnd
Example: Perform a 4-sample FFT for the input sequence x[n]={ 1, 0, 3, 1}
Press Prog 1 1 EXE 0 EXE 3 EXE 1 EXE (read-out: 5) EXE (read-out: 0)
EXE (read-out: -2) EXE (read-out: 1)
EXE (read-out: 3) EXE (read-out: 0)
EXE (read-out: -2) EXE (read-out: -1)
Therefore, the result is:
X[0] = 5
X[1] = - 2 + j
X[2] = 3
X[3] = - 2 - j