Skip to content

Instantly share code, notes, and snippets.

@jukworks
Created November 8, 2012 06:34

Revisions

  1. jukworks created this gist Nov 8, 2012.
    23 changes: 23 additions & 0 deletions gistfile1.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    import edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D;

    public class FftTest {
    public static void main(String[] args) {
    double[] input = new double[]{
    0.0176,
    -0.0620,
    0.2467,
    0.4599,
    -0.0582,
    0.4694,
    0.0001,
    -0.2873};
    DoubleFFT_1D fftDo = new DoubleFFT_1D(input.length);
    double[] fft = new double[input.length * 2];
    System.arraycopy(input, 0, fft, 0, input.length);
    fftDo.realForwardFull(fft);

    for(double d: fft) {
    System.out.println(d);
    }
    }
    }