I am getting completely different values of FFT([1,2]) in scilab and Wolfram. I wondering what is going on and who is right.
Wolfram alpha: fft([1,2]):
{2.12132, -0.707107}
Scilab fft([1,2]):
3. -1.
I am getting completely different values of FFT([1,2]) in scilab and Wolfram. I wondering what is going on and who is right.
Wolfram alpha: fft([1,2]):
{2.12132, -0.707107}
Scilab fft([1,2]):
3. -1.
Copyright © 2021 JogjaFile Inc.
It really depends on the definition... Scilab is using $$ X_k = \sum_{n=0}^{N-1}x_ n e^{-i 2 \pi k n/N}, \quad k = 0, \cdots, N-1 $$
While Wolfram's default definition is
$$ X_k = \frac{1}{\sqrt{N}}\sum_{n=0}^{N-1}x_ n e^{-i 2 \pi k n/N}, \quad k = 0, \cdots, N-1 $$
If you want Wolfram to use the same definition, you must use the parameter "FourierParameters->{1,-1}". The general case in Wolfram ({a,b}) is
$$ X_k = \frac{1}{n^{(1-a)/2}}\sum_{n=0}^{N-1}x_ n e^{i 2 b \pi k n/N}, \quad k = 0, \cdots, N-1 $$