26#if defined (HAVE_CONFIG_H)
43 int nargin = args.
length ();
45 if (nargin < 1 || nargin > 3)
52 int ndims = dims.
ndims ();
57 if (! args(1).isempty ())
59 double dval = args(1).double_value ();
60 if (math::isnan (dval))
61 error (
"%s: number of points (N) cannot be NaN", fcn);
63 n_points = math::nint_big (dval);
65 error (
"%s: number of points (N) must be greater than zero", fcn);
71 double dval = args(2).double_value ();
72 if (math::isnan (dval))
73 error (
"%s: DIM cannot be NaN", fcn);
74 else if (dval < 1 || dval > ndims)
75 error (
"%s: DIM must be a valid dimension along which to perform FFT",
79 dim = math::nint (dval) - 1;
96 if (n_points == 0 || dims.
any_zero ())
214 return do_fft (args,
"fft", 0);
243 return do_fft (args,
"ifft", 1);
348OCTAVE_END_NAMESPACE(octave)
void resize(const dim_vector &dv, const T &rfv)
Size of the specified dimension.
ComplexNDArray fourier(int dim=1) const
ComplexNDArray ifourier(int dim=1) const
FloatComplexNDArray ifourier(int dim=1) const
FloatComplexNDArray fourier(int dim=1) const
FloatComplexNDArray ifourier(int dim=1) const
FloatComplexNDArray fourier(int dim=1) const
ComplexNDArray ifourier(int dim=1) const
ComplexNDArray fourier(int dim=1) const
Vector representing the dimensions (size) of an Array.
octave_idx_type ndims() const
Number of dimensions.
int first_non_singleton(int def=0) const
static const idx_vector colon
octave_idx_type length() const
octave_value index_op(const octave_value_list &idx, bool resize_ok=false)
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
bool is_single_type() const
NDArray array_value(bool frc_str_conv=false) const
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
FloatNDArray float_array_value(bool frc_str_conv=false) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void error(const char *fmt,...)
void err_wrong_type_arg(const char *name, const char *s)