-1

I am new to programming in Java, and new to apach.commons.math3 library. I want to use fft in order to transform time series into Fourier series. the time series is saved in array of double named input. I'm using the following line to call the transform function:

Complex[] fourierSereis=FastFourierTransformer.transform(input,TransformType.FORWARD);

ButI get the following error:

Cannot make a static reference to the non-static method transform(double[], TransformType) from the type FastFourierTransformer

Can someone please explain me what does that error means and what should I do to make it work?

Thank you

user1798339
  • 57
  • 1
  • 6
  • `FastFourierTransformer transformer = new FastFourierTransformer(DftNormalization.STANDARD); Complex[] fourierSeries = transformer.transform(...);` Depending on preference, you might use `DftNormalization.UNITARY` in the constructor call instead. – Anders Gustafsson May 20 '14 at 12:02

1 Answers1

1

You have to create an object of FastFourierTransformer type and then call this method because it's not a static method of this class.

wawek
  • 1,577
  • 1
  • 13
  • 23