Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語

Please note that the recommended version of Scilab is 6.0.2. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilab manual >> FFTW > fftw


Fast fourier transform based on the fftw library

Calling Sequence

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



matrix/vector of real/complex data. Input/output data to be transformed.


Integer. 1 or -1. Set direct or inverse transform.


integer. Set the dimension (the length) of the transform.


integer. Set the stride (the span) of the transform.


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 :

Remark: fftw function automatically stores his last parameters in memory to re-use it in a second time.

This improves greatly the time computation when consecutives calls (with same parameters) are performed.


//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));

//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]);


Matteo Frigo and Steven G. Johnson, "FFTW Manual fo version 3.1.2" June 2006. Available :

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jan 26 16:23:41 CET 2011