Hello FFT-fans

Let me direct your attention to the useful fact that a variant of the fourier 
transform is EXACTLY equal to its inverse.

So you need no longer distinguish between fft and ifft.

The trick is to take the complex conjugate of the input before the 
transformation.

Below is an example, using an elementary SLOW fourier transform algorithm. It 
needs to be translated into the FAST fourier transform in order to become 
useful.


   PU =. _1 ^ +:      NB. Power of Unity. (1^ doesn't work).
   M1 =. (*/])&i.     NB. N*N multiplication table
   M2 =. M1 % ]       NB. divided by N
   M3 =. PU&M2        NB. 1^(i*j%N) matrix
   M4 =. M3 % %:      NB. divided by square root of N
   SFT=. +/ . * m...@#  NB. Slow Fourier Transform
   IFT=. SFT @: +     NB. Involutory FT
   IFT f.             NB. Summary
(+/ .* ((_1 ^ +:)&(%~ (*/ ])&i.) % %:)@#)@:+

NB. test that IFT is involutory
   1e_10>|(- IFT^:2)>:?30$100 
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1




----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to