jtransforms problem

Posted on 2011-04-26
Last Modified: 2012-06-22
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[][]) 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.

Question by:chudyksg
    LVL 92

    Expert Comment

    Thats weird. Poor documentation though, makes it hard to work out whats going on
    LVL 92

    Accepted Solution

    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."

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    If you have upgraded to Java2 update 10 on a Microsoft Windows client, you may have discovered that your Java application does not work as it did before.  For example, the colors of your Java2D graphic may be all wrong for no apparent reason. Aft…
    For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now