38 #if defined (HAVE_FFTW)
39 #define FFTSRC "@sc{fftw}"
41 #define FFTSRC "@sc{fftpack}"
49 int nargin = args.
length ();
51 if (nargin < 1 || nargin > 3)
63 double dval = args(1).double_value ();
65 error (
"%s: number of rows (N) cannot be NaN", fcn);
70 error (
"%s: number of rows (N) must be greater than zero", fcn);
80 double dval = args(2).double_value ();
82 error (
"%s: number of columns (M) cannot be NaN", fcn);
87 error (
"%s: number of columns (M) must be greater than zero", fcn);
94 for (
int i = 0; i < dims.
length (); i++)
108 if (dims.
all_zero () || n_rows == 0 || n_cols == 0)
172 @deftypefn {Built-in Function} {} fft2 (@var{A})\n\
173 @deftypefnx {Built-in Function} {} fft2 (@var{A}, @var{m}, @var{n})\n\
174 Compute the two-dimensional discrete Fourier transform of @var{A} using\n\
175 a Fast Fourier Transform (FFT) algorithm.\n\
177 The optional arguments @var{m} and @var{n} may be used specify the number of\n\
178 rows and columns of @var{A} to use. If either of these is larger than the\n\
179 size of @var{A}, @var{A} is resized and padded with zeros.\n\
181 If @var{A} is a multi-dimensional matrix, each two-dimensional sub-matrix\n\
182 of @var{A} is treated separately.\n\
183 @seealso{ifft2, fft, fftn, fftw}\n\
186 return do_fft2 (args,
"fft2", 0);
190 DEFUN (ifft2, args, ,
192 @deftypefn {Built-in Function} {} ifft2 (@var{A})\n\
193 @deftypefnx {Built-in Function} {} ifft2 (@var{A}, @var{m}, @var{n})\n\
194 Compute the inverse two-dimensional discrete Fourier transform of @var{A}\n\
195 using a Fast Fourier Transform (FFT) algorithm.\n\
197 The optional arguments @var{m} and @var{n} may be used specify the number of\n\
198 rows and columns of @var{A} to use. If either of these is larger than the\n\
199 size of @var{A}, @var{A} is resized and padded with zeros.\n\
201 If @var{A} is a multi-dimensional matrix, each two-dimensional sub-matrix\n\
202 of @var{A} is treated separately\n\
203 @seealso{fft2, ifft, ifftn, fftw}\n\
206 return do_fft2 (args,
"ifft2", 1);
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
bool is_real_type(void) const
ComplexNDArray ifourier2d(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
FloatComplexNDArray fourier2d(void) const
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
static octave_value do_fft2(const octave_value_list &args, const char *fcn, int type)
ComplexNDArray fourier2d(void) const
FloatComplexNDArray fourier2d(void) const
FloatComplexNDArray ifourier2d(void) const
FloatNDArray float_array_value(bool frc_str_conv=false) const
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
ComplexNDArray ifourier2d(void) const
bool is_complex_type(void) const
void resize(const dim_vector &dv, const T &rfv)
dim_vector dims(void) const
bool all_zero(void) const
NDArray array_value(bool frc_str_conv=false) const
ComplexNDArray fourier2d(void) const
FloatComplexNDArray ifourier2d(void) const
bool is_single_type(void) const
octave_idx_type NINTbig(double x)
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))