Discrete Fourier Transform using WolframAlpha

3.5k Views Asked by At

I tried to verify a calculation with WolframAlpha. I want to compute the DFT of $[2,3,-3,1]$. So in particular one entry of the result vector should be $2+3-3+1=3$.

I don't understand why I get {1.5+0. i, 2.5+1. i, -2.5+0. i, 2.5-1. i}. What does that mean and where is my 3?

WolframAlpha computation.

1

There are 1 best solutions below

0
On

That is because Wolfram alpha uses the formula for the DFT as $X(k)=\frac{1}{\sqrt{N}}\sum_{n=0}^{N-1}x(n)e^{-j2\pi k/N}$ -- Samrat Mukhopadhyay

The terms like $0.i$ appear because the coefficients are in general complex numbers, but in some of them the imaginary part is zero within machine precision. (Theoretically, it is exactly zero, but the computation uses floating point arithmetics.)