アットウィキロゴ

gggg9766

package math;
 
import org.apache.commons.math3.transform.FastFourierTransformer;
import org.apache.commons.math3.complex.Complex;
import org.apache.commons.math3.transform.DftNormalization;
import org.apache.commons.math3.transform.TransformType;
 
class pro{
 
public static void main(String[] args) { 
pro test=new pro();
}
 
pro(){
 
 
FastFourierTransformer tr = new FastFourierTransformer(DftNormalization.STANDARD);
 
Complex result[]; 
        double tolerance = 1E-12;
 
        double x[] = {1.3, 2.4, 1.7, 4.1, 2.9, 1.7, 5.1, 2.7};
        Complex y[] = {
            new Complex(21.9, 0.0),
            new Complex(-2.09497474683058, 1.91507575950825),
            new Complex(-2.6, 2.7),
            new Complex(-1.10502525316942, -4.88492424049175),
            new Complex(0.1, 0.0),
            new Complex(-1.10502525316942, 4.88492424049175),
            new Complex(-2.6, -2.7),
            new Complex(-2.09497474683058, -1.91507575950825)};
 
 
 
        result = tr.transform(y, TransformType.FORWARD);
 
        System.out.println(result[1]);
 
 
 
 
 
}
}
最終更新:2015年11月18日 16:33