question: 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 ] ) ; }
target:  Computes the magnitude spectrum of a real sequence (in place).