26 #if defined (HAVE_CONFIG_H)
40 DEFUN (__dsearchn__, args, ,
46 if (args.length () != 2)
49 Matrix x = args(0).matrix_value ().transpose ();
50 Matrix xi = args(1).matrix_value ().transpose ();
52 if (
x.rows () !=
xi.rows () ||
x.columns () < 1)
53 error (
"__dsearchn__: number of rows of X and XI must match");
64 #define DIST(dd, y, yi, m) \
66 for (octave_idx_type k = 0; k < m; k++) \
68 double yd = y[k] - yi[k]; \
73 const double *pxi =
xi.data ();
77 const double *px =
x.data ();
88 *pidx =
static_cast<double> (j + 1);
98 return ovl (idx, dist);
#define DIST(dd, y, yi, m)
OCTARRAY_API T * fortran_vec(void)
Size of the specified dimension.
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
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]