Scilab Function
Last update : 25/10/2006

fftw - fast fourier transform that use fftw library

Calling Sequence

[y]=fftw(x)
[y]=fftw(x,sign)
[y]=fftw(x,sign,dim,incr)
[y]=fftw(x,sign,[dim1 dim2 ...dimN],[incr1 incr2 ...incrN])

Parameters

Description

This function realizes direct/inverse Discrete Fourier Transform (DFT) with the help of the FFTW library.

One can compute vector, 2D, M-D transform with this function.

For more details of fftw syntax see fft scilab function.

For more details about FFTW library see FFTW Web site : http://www.fftw.org .

Remark : fftw function automaticaly stores his last parameters in memory to re-use it in a second time. This results on a time computation improvement when consecutives calls (with same parameters) are used.

Examples

  
  //simple vector direct transform
  a = rand(50,1)+%i*rand(50,1);
  y = fftw(a);
  y = fftw(a,-1);
  //inverse transform
  b = fftw(y,1);

  //2D transform
  a = rand(512,512)+%i*rand(512,512);
  y = fftw(a);

  //M-D transform -old calling sequence-
  a = rand(120,1);
  y = a;
  dim=[5 6 4];incr=[1 5 30];
  for i=1:3
    y = fftw(y,-1,dim(i),incr(i));
  end

  //M-D transform -new calling sequence-
  //More efficient than old
  y = fftw(a,-1,[5 6 4],[1 5 30]);
  b = fftw(y,1,[5 6 4],[1 5 30]);
  
  

See Also

fftw_flags ,   fftw_norm ,   fftw_inplace ,   pushfftw_plan ,   freefftw_plan ,  

Bibliography

Matteo Frigo and Steven G. Johnson, "FFTW Manual fo version 3.1.2" June 2006. Available : http://www.fftw.org