26 #if defined (HAVE_CONFIG_H)
38 DEFUN (__dsearchn__, args, ,
44 if (args.length () != 2)
47 Matrix x = args(0).matrix_value ().transpose ();
48 Matrix xi = args(1).matrix_value ().transpose ();
50 if (
x.rows () !=
xi.rows () ||
x.columns () < 1)
51 error (
"__dsearch__: number of rows of X and XI must match");
62 #define DIST(dd, y, yi, m) \
64 for (octave_idx_type k = 0; k < m; k++) \
66 double yd = y[k] - yi[k]; \
71 const double *pxi =
xi.fortran_vec ();
75 const double *px =
x.fortran_vec ();
86 *pidx =
static_cast<double> (j + 1);
96 return ovl (idx, dist);
#define DIST(dd, y, yi, m)
const T * fortran_vec(void) const
Size of the specified dimension.
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,...)
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
F77_RET_T const F77_DBLE * x
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
static const double xi[33]