I\'ve got this code, but it keeps returning random frequencies from 0 to about 1050. Please can you help me understand why this is happening.
My data length is 1024, sam
Two things:
fft
function correctly? You treat the output as if it is a complex array organized [R_1 I_1 R_2 I_2 ...]
, but you treat the input array as if it is Organized [R_1 R_2 R_3 ... R_1024 I_1 I_2 ...]
and as Henrik says then leave the complex parts uninitialized. Have you tried putting a known simple (i.e. pure sine) signal as input?