private void magnitudeFFT(double[] re){
  double[] im=new double[re.length];
  fft(re,im,FFT_FORWARD);
  for (int i=0; i < re.length; i++)   re[i]=Math.sqrt(re[i] * re[i] + im[i] * im[i]);
}

private void magnitudeFFT ( double [ ] re ) { double [ ] im = new double [ re . length ] ; fft ( re , im , FFT_FORWARD ) ; for ( int i = 0 ; i < re . length ; i ++ ) re [ i ] = Math . sqrt ( re [ i ] * re [ i ] + im [ i ] * im [ i ] ) ; }
computes the magnitude spectrum of a real sequence ( in place ) .
