What is the difference in Mathematica between the following:
pts = {{1, 2}, {2, 3}, {8, 2.2}, {4.5, 3.1}, {1, 2}};
toComplex[pts_] := pts[[All, 1]] + I pts[[All, 2]];
(* first *)
Fourier[Transpose@pts, FourierParameters -> {-1, 1}]
(* second *)
Fourier[toComplex@pts, FourierParameters -> {-1, 1}]
They appear to output "close" results, but not exact.
Outputs:
(* first *)
{2.88 + 0. I, -0.892837 + 0.343035 I, 0.202837 - 0.129718 I,
0.202837 + 0.129718 I, -0.892837 - 0.343035 I}, {0.42 +
0. I, -0.744296 + 0.258626 I, 0.284296 - 0.418465 I,
0.284296 + 0.418465 I, -0.744296 - 0.258626 I}}
(* second *)
{3.3 + 2.46 I, -1.72154 + 0.45312 I, 0.198385 - 0.629641 I,
0.77588 + 0.466724 I, -1.55272 - 0.750202 I}
I do notice for the transpose DFT if I total it I get
{3.3 + 0. I, -1.63713 + 0.601661 I, 0.487132 - 0.548183 I,
0.487132 + 0.548183 I, -1.63713 - 0.601661 I}
Which is pretty close ($3.3$ being the same for the real portion of the first point, other points are "pretty" close).
What is the difference between representing $(x, y)$ points as complex numbers, $x + i y$, vs two lists: one list of the $x$ values and one of the $y$ values in the DFT in Mathematica?
I have seen in the Scope section of the documentation on Fourier that it appears to be a "2D" Fourier transform, however I do not understand what that means as my understanding is that a complex number is a "2D" number.
- https://mathematica.stackexchange.com/a/17780/71533
- https://mathematica.stackexchange.com/a/171658/71533
– Alex D Apr 12 '20 at 08:26