2009-07-09 02:13 AM
FFT produces strange result
2011-05-17 04:16 AM
Hello,
I'm using the cr4_fft_64_stm32 function in the dsplib, but gets some unexpected result. I have tried using a simple sine function to understand the problem:Code:
<BR>u32 out2[SMPL], out3[SMPL], val; <BR>... <BR>val = (u32) (sin (8*PI*i/SMPL)*500 + 1500); <BR>out2[i] = (((u16)(val)) | ((u32)(0<<16))); <BR>... <BR>cr4_fft_256_stm32(out3, out2, SMPL); <BR>
where SMPL = When I print the the input and output values it looks like this: Any ideas? Kind regards, Sarling [ This message was edited by: sarling on 08-07-2009 18:19 ]2011-05-17 04:16 AM
I guess you need to zero out the imag. part, but it still looks about the same.
Code:
for (i = 0; i < SMPL; i++) { out3[i] &= 0x0000FFFF; }2011-05-17 04:16 AM
Anyone?