24 #if defined (HAVE_CONFIG_H) 36 #if defined (HAVE_FFTW) 37 # define FFTSRC "@sc{fftw}" 39 # define FFTSRC "@sc{fftpack}" 54 int ndims =
dims.ndims ();
59 if (! args(1).isempty ())
61 double dval = args(1).double_value ();
63 error (
"%s: number of points (N) cannot be NaN",
fcn);
67 error (
"%s: number of points (N) must be greater than zero",
fcn);
73 double dval = args(2).double_value ();
75 error (
"%s: DIM cannot be NaN",
fcn);
76 else if (dval < 1 || dval > ndims)
77 error (
"%s: DIM must be a valid dimension along which to perform FFT",
93 dim =
dims.first_non_singleton ();
101 n_points =
dims(dim);
103 dims(dim) = n_points;
105 if (n_points == 0 ||
dims.any_zero ())
118 idx(dim) =
idx_vector (static_cast<octave_idx_type> (0));
209 return do_fft (args,
"fft", 0);
238 return do_fft (args,
"ifft", 1);
ComplexNDArray fourier(int dim=1) const
ComplexNDArray ifourier(int dim=1) const
static const idx_vector colon
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void error(const char *fmt,...)
FloatComplexNDArray fourier(int dim=1) const
FloatNDArray float_array_value(bool frc_str_conv=false) const
FloatComplexNDArray ifourier(int dim=1) const
ComplexNDArray fourier(int dim=1) const
static octave_value do_fft(const octave_value_list &args, const char *fcn, int type)
bool is_single_type(void) const
dim_vector dims(void) const
FloatComplexNDArray fourier(int dim=1) const
void resize(const dim_vector &dv, const T &rfv)
Resizing (with fill).
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
void err_wrong_type_arg(const char *name, const char *s)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_idx_type nint_big(double x)
octave_idx_type length(void) const
bool iscomplex(void) const
ComplexNDArray ifourier(int dim=1) const
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
Vector representing the dimensions (size) of an Array.
FloatComplexNDArray ifourier(int dim=1) const
NDArray array_value(bool frc_str_conv=false) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)