MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

R and Mathematica software differ when computing fft(c(1,1)) and Fourier[{1,1}],

2+0i 0+0i


{1.41421+ 0i, 0} respectively. How can this be????

share|cite|improve this question

closed as off topic by Gerald Edgar, Yemon Choi, Torsten Ekedahl, Felipe Voloch, Andrés E. Caicedo Jul 30 '11 at 22:21

Questions on MathOverflow are expected to relate to research level mathematics within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

off topic, see the FAQ – Gerald Edgar Jul 30 '11 at 18:44
Obviously, they're using different definitions. The notation and conventions associated with the Fourier transform differ between different authors, although it's usually easy to figure out the differences and adjust your results accordingly. A look at the documentation for the R and Mathematica functions should help you figure this out. – Brian Borchers Jul 30 '11 at 18:51
up vote 2 down vote accepted

Normalizing factor.

It looks like R defines the Discrete Fourier Transform matrix as $F = [1$ $1; 1$ $-1]$ while Mathematica defines it as $F = \frac{1}{\sqrt{2}}[1$ $1; 1$ $-1]$.

If you do inverse fft - R would define it to be $F^{-1} = \frac{1}{2}[1$ $1; 1$ $-1]$ while Mathematica would define it as $F^{-1} = F^{H} = \frac{1}{\sqrt{2}}[1$ $1; 1$ $-1]$ where $H$ is Hermitian transpose.

share|cite|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.