Hi Guga,

FFT ( Fast Fourier Transform ) comes in all kind of flavours, complex to complex, real to complex, real to real, interleaved or not interleaved, 1D, 2D etc....

My FFT routine posted here is "complex to complex", interleaved input and interleaved output. ( real,imag,real,imag, etc. )

If you insert these 32 ( = FFTsize 16 ) values to "Mark’s FFT Calculator"

http://www.themobilestudio.net/the-fourier-transform-part-15"Input Samples" set to "Complex Wave"

Copy these values ( = Complex input) as complex wave,

`0.0`

0.0

1.0

0.0

2.0

0.0

3.0

0.0

4.0

0.0

5.0

0.0

6.0

0.0

7.0

0.0

8.0

0.0

9.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

0.0

You get this as FFT results:

REAL: 45.000 -25.452 10.364 -9.064 4.000 -1.279 -2.364 3.795

REAL: -5.000 3.795 -2.364 -1.279 4.000 -9.064 10.364 -25.452

IMAG: 0.000 -16.665 3.293 2.328 -5.000 5.642 -4.707 2.648

IMAG: 0.000 -2.649 4.707 -5.642 5.000 -2.328 -3.293 16.665

Why he outputs the results twice I don't know, 0-15 are the actual results, 16-31 is just a copy of 0-15.

So, if you insert the same values in my FFT routine ( FFTsize equ 16, and do not normalize! )

Complex to Complex, Interleaved input:

`ComplexData real4 0.0,0.0,1.0,0.0,2.0,0.0,3.0,0.0,4.0,0.0,5.0,0.0,6.0,0.0,7.0,0.0,8.0,0.0,9.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 ; test data`

You get this as output,

Interleaved ouput: ( real, Imaginary, not normalized)

45.000 0.000 -25.452 -16.665 10.364 3.293 -9.064 2.328

4.000 -5.000 -1.279 5.642 -2.364 -4.707 3.795 2.648

-5.000 0.000 3.795 -2.649 -2.364 4.707 -1.279 -5.642

4.000 5.000 -9.064 -2.328 10.364 -3.293 -25.452 16.665

And is exactly the same as calculated in "Mark’s FFT Calculator"

I promised to post my latest FFT code.

But there is an error in the calculations which I need to correct first. This can take some time since I'm really busy at the moment. Sorry...