Browsing this Thread:
1 Anonymous Users
|
FFT 範例CE018相關問題
|
|
中級會員
Joined
: 2015/12/9 8:30 最後登入時間
: 2023/8/18 11:24
Group:
註冊會員
Level : 5 HP : 0 / 114 MP : 15 / 2820 EXP : 59
|
各位好 因不熟練C語言 想請問CE018範例中,inputsignal_square1khz.c的輸入訊號sigCmpx 看起來是將ADC值依序放在sigCmpx[0].real , sigCmpx[0].imag ,sigCmpx[1].real , sigCmpx[1].imag (所以256點只會放到sigCmpx[128]) 然後經過下面主程式 把第一筆ADC值放在sigCmpx[0].real 再放0x0000到sigCmpx[0].imag , 依序放入sigCmpx變數 再去做FFT 這樣理解對嗎
然後經過SquareMagnitudeCplx輸出的sigCmpx變數是否已經沒有 real和imag的分別,每一個點都是代表頻率的大小,這樣的理解對嗎 THX //////////////////////////////////主程式程式碼///////////////////////////////////////// p_real = &sigCmpx[(FFT_BLOCK_LENGTH/2)-1].real ; p_cmpx = &sigCmpx[FFT_BLOCK_LENGTH-1] ; for ( i = FFT_BLOCK_LENGTH; i > 0; i-- ) { (*p_cmpx).real = (*p_real--); (*p_cmpx--).imag = 0x0000; } ///////////////////////////////////////////////////////////////////////////////////////////////////
發表於: 2021/2/5 11:18
|
|
You can view topic.
你 不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.