# Thread: How is complex DFT defined??

1. ## How is complex DFT defined??

Hello

I was reading a lot and wrote some stuff on the computer to make the DFT (discrete Fourier transform) in several ways.

My problem is that many errors are in literature. I gave up watching the scaling factors, because the flood of conventions is too big. The worst problem is that in some sources there is minus in front of the "i" and in others not.

For example:
Matlab does it with minus in Front and Mathematica does it without. Cambridge "Numerical Recipes” does it without minus.

It isn't the same thing! Sure the magnitude spectrum, the power spectrum and the absorption spectrum stay the same but the dispersion spectrum depends on if there is a minus or not.

(Dispersion Spectrum is Im(X) in function of frequency. You can do cosine Fourier transform as well to obtain it.)

With the knowledge how the Dispersion Spectrum should look like, there is no more to say that there has to be a minus in front of the i. So Mathematica and NR do it wrong.

I am chemist and there is something called IUPAC, which defines a lot of useful rules and conventions. Is there something similar in mathematics? A Group which make rules?

Can anybody tell me how complex DFT really is defined, and whether I am right that Mathematica is wrong.

Thank you

2. From A.W. Oppenheim, R.W. Shafer Digital Signal Processing, Prentice Hall, 1975...

... given a finite duration complex sequence $x(n)\ ,\ n=0,1,...,N-1$ its Discrete Fourier Transform is the finite duration compex sequence $X(k)\ ,\ k=0,1,...,N-1$ defined as...

$\displaystyle X(k)= \sum_{n=0}^{N-1} x(n)\ e^{-j 2 \pi \frac{k n}{N}$ (1)

... where $j$ is the 'imaginary unit'...

Kind regards

$\chi$ $\sigma$

3. @ chisigma

Thank you very much. So Mathematica does it really wrong?

4. You have to take into account that usually the notation $W_{N} = e^{-j \frac{2 \pi}{N}}$ is used so that the definition of DFT is...

$\displaystyle X(k)= \sum_{n=0}^{N-1} x(n)\ W^{k n}_{N}$ (1)

... and in (1) the symbol '-' in the exponent doesn't appear...

Kind regards

$\chi$ $\sigma$

5. Mathematica uses the same farmula as the cited book. With the difference that they omit the minus. The n and the k are subtrahated by 1 because they use another interval of summation.

Here is the Formular:
http://reference.wolfram.com/mathema...urier.en/1.gif

It can be found in the Wolfram Referece site, by pressing "more detail":
http://reference.wolfram.com/mathema...urier.en/1.gif

Cambridge "Numerical Recipes” uses as well the same formula as you but without minus.

EDIT:

The 1/sqrt(n) is just a scaling factor of minor relevance

6. Originally Posted by Boojakascha
Mathematica uses the same farmula as the cited book. With the difference that they omit the minus. The n and the k are subtrahated by 1 because they use another interval of summation.

Here is the Formular:
http://reference.wolfram.com/mathema...urier.en/1.gif

It can be found in the Wolfram Referece site, by pressing "more detail":
http://reference.wolfram.com/mathema...urier.en/1.gif

Cambridge "Numerical Recipes” uses as well the same formula as you but without minus.

EDIT:

The 1/sqrt(n) is just a scaling factor of minor relevance
Nobody does it wrong they are using different conventions.

There is no central authority in mathematics that decides which definitions are canonical.

There are many common conventions, and where these exist we like to stick to them, or if we deviate state what we are using. However the FT is used by many people in many fields, each with its own convention. So it is up to the user to sort out the differences and make sure that the convention that they want is that being used in third party tools etc.

CB