eponymous
08-24-2008, 08:21 PM
Hi
I'm new to NR and was just wondering if I can do this to get a forward Fourier transform of just the positive frequency:
float input[1024];
realft(input, 1024, 1);
I wasn't sure this was right becuase it says in the function comments that it replaces data[1..n] with the FFT, but my array starts at index 0, not 1.
I want the values to go from 0 -> 1023, not 1->1024.
Also, does the array look like this when finished:
real // first real component
real // last real component
real
imaginary
real
imaginary
etc..?
I hope someone can help,
Thanks.
I'm new to NR and was just wondering if I can do this to get a forward Fourier transform of just the positive frequency:
float input[1024];
realft(input, 1024, 1);
I wasn't sure this was right becuase it says in the function comments that it replaces data[1..n] with the FFT, but my array starts at index 0, not 1.
I want the values to go from 0 -> 1023, not 1->1024.
Also, does the array look like this when finished:
real // first real component
real // last real component
real
imaginary
real
imaginary
etc..?
I hope someone can help,
Thanks.