37 #if defined (HAVE_FFTW)
38 #define FFTSRC "@sc{fftw}"
40 #define FFTSRC "@sc{fftpack}"
48 int nargin = args.
length ();
50 if (nargin < 1 || nargin > 2)
59 for (
int i = 0; i < dims.
length (); i++)
65 Matrix val = args(1).matrix_value ();
70 error (
"%s: SIZE must be a vector of length dim", fcn);
73 for (
int i = 0; i < dims.
length (); i++)
76 error (
"%s: SIZE has invalid NaN entries", fcn);
77 else if (
NINTbig (val(i,0)) < 0)
78 error (
"%s: all dimensions in SIZE must be greater than zero",
155 @deftypefn {Built-in Function} {} fftn (@var{A})\n\
156 @deftypefnx {Built-in Function} {} fftn (@var{A}, @var{size})\n\
157 Compute the N-dimensional discrete Fourier transform of @var{A} using\n\
158 a Fast Fourier Transform (FFT) algorithm.\n\
160 The optional vector argument @var{size} may be used specify the\n\
161 dimensions of the array to be used. If an element of @var{size} is\n\
162 smaller than the corresponding dimension of @var{A}, then the dimension of\n\
163 @var{A} is truncated prior to performing the FFT@. Otherwise, if an element\n\
164 of @var{size} is larger than the corresponding dimension then @var{A}\n\
165 is resized and padded with zeros.\n\
166 @seealso{ifftn, fft, fft2, fftw}\n\
169 return do_fftn (args,
"fftn", 0);
172 DEFUN (ifftn, args, ,
174 @deftypefn {Built-in Function} {} ifftn (@var{A})\n\
175 @deftypefnx {Built-in Function} {} ifftn (@var{A}, @var{size})\n\
176 Compute the inverse N-dimensional discrete Fourier transform of @var{A}\n\
177 using a Fast Fourier Transform (FFT) algorithm.\n\
179 The optional vector argument @var{size} may be used specify the\n\
180 dimensions of the array to be used. If an element of @var{size} is\n\
181 smaller than the corresponding dimension of @var{A}, then the dimension of\n\
182 @var{A} is truncated prior to performing the inverse FFT@. Otherwise, if an\n\
183 element of @var{size} is larger than the corresponding dimension then @var{A}\n\
184 is resized and padded with zeros.\n\
185 @seealso{fftn, ifft, ifft2, fftw}\n\
188 return do_fftn (args,
"ifftn", 1);