can anyone tell me what is correct result after Fast Furier Transform, if input array is {0,1,2,3,4,5,6,7}.
I got {28,0,0,0,0,0,0,0}. It isn't correct right?
just want to test FFT implementation in C.
thanks, Andrey
The correct answer to a FFT for {0,1,2,3,4,5,6,7}
is
{28.0000 + 0.0000i,
-4.0000 + 9.6569i,
-4.0000 + 4.0000i,
-4.0000 + 1.6569i,
-4.0000 + 0.0000i,
-4.0000 - 1.6569i,
-4.0000 - 4.0000i,
-4.0000 - 9.6569i}
No, it isn't correct (a single non-zero output element implies that your input consists of either a constant value, or a single complex-exponential component).
Why don't you use an existing FFT implementation, such as FFTW to provide a reference result? Or just implement a straightforward DFT?
According to Wolfram Alpha it's:
Note that there is no single "correct answer" as there is more than one definition of the DFT/FFT, the difference between each one being what scaling factor you include for forward and inverse transform. (The difference between this answer and the earlier accepted answer is just a scaling factor of sqrt(8)
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With