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 dimensions\n\
161 of the array to be used. If an element of @var{size} is smaller than the\n\
162 corresponding dimension of @var{A}, then the dimension of @var{A} is\n\
163 truncated prior to performing the FFT@. Otherwise, if an element of\n\
164 @var{size} is larger than the corresponding dimension then @var{A} is\n\
165 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 dimensions\n\
180 of the array to be used. If an element of @var{size} is smaller than the\n\
181 corresponding dimension of @var{A}, then the dimension of @var{A} is\n\
182 truncated prior to performing the inverse FFT@. Otherwise, if an element of\n\
183 @var{size} is larger than the corresponding dimension then @var{A} is\n\
184 resized and padded with zeros.\n\
185 @seealso{fftn, ifft, ifft2, fftw}\n\
188 return do_fftn (args,
"ifftn", 1);
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
bool is_real_type(void) const
void gripe_wrong_type_arg(const char *name, const char *s, bool is_error)
OCTINTERP_API void print_usage(void)
octave_idx_type length(void) const
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
ComplexNDArray ifourierNd(void) const
octave_idx_type rows(void) const
FloatComplexNDArray ifourierNd(void) const
FloatComplexNDArray ifourierNd(void) const
static octave_value do_fftn(const octave_value_list &args, const char *fcn, int type)
FloatNDArray float_array_value(bool frc_str_conv=false) const
ComplexNDArray fourierNd(void) const
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
FloatComplexNDArray fourierNd(void) const
bool is_complex_type(void) const
void resize(const dim_vector &dv, const T &rfv)
Matrix transpose(void) const
FloatComplexNDArray fourierNd(void) const
dim_vector dims(void) const
bool all_zero(void) const
ComplexNDArray fourierNd(void) const
NDArray array_value(bool frc_str_conv=false) const
ComplexNDArray ifourierNd(void) const
bool is_single_type(void) const
octave_idx_type NINTbig(double x)
octave_idx_type columns(void) const
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))