• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1660
  • Last Modified:

jtransforms problem

Can somebody help me with that. I am using an fft library jtransforms. When I apply the fft to an array:

 double[][] array = new double[][] {{1,1,1,1},{1,1,1,1}};
DoubleFFT_2D fft = new DoubleFFT_2D(2,2);

Then I am getting the following results:
[4.0, 0.0, 0.0, -1.0]
[0.0, 0.0, 0.0, 0.0]

In the api http://incanter.org/docs/parallelcolt/api/edu/emory/mathcs/jtransforms/fft/DoubleFFT_2D.html#realForwardFull(double[][]) it says that "To get back the original data, use complexInverse on the output of this method."

so I am doing:
fft.complexInverse(array, false);
and I am getting:
[4.0, -1.0, 4.0, 1.0]
[4.0, -1.0, 4.0, 1.0]

where I want to get back to the original data which is only 1's.

  • 2
1 Solution
Thats weird. Poor documentation though, makes it hard to work out whats going on
check your data matches this from the javadoc:

"Because the result is stored in a, the input array must be of size rows by 2*columns, with only the first rows by columns elements filled with real data."

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now