26 #if defined (HAVE_CONFIG_H)
42 DEFUN (__pchip_deriv__, args, ,
49 int nargin = args.length ();
51 bool rows = (nargin == 3 && args(2).uint_value () == 2);
55 if (args(0).is_single_type () || args(1).is_single_type ())
63 error (
"__pchip_deriv__: X must be at least of length 2");
68 if (nx != (rows ? nyc : nyr))
69 error (
"__pchip_deriv__: X and Y dimension mismatch");
74 const F77_INT incfd = (rows ? octave::to_f77_int (nyr) : 1);
81 ymat.
data () + k * inc,
88 error (
"__pchip_deriv__: PCHIM failed with ierr = %i",
ierr);
96 Matrix ymat (args(1).matrix_value ());
101 error (
"__pchip_deriv__: X must be at least of length 2");
106 if (nx != (rows ? nyc : nyr))
107 error (
"__pchip_deriv__: X and Y dimension mismatch");
112 const F77_INT incfd = (rows ? octave::to_f77_int (nyr) : 1);
119 ymat.
data () + k * inc,
125 error (
"__pchip_deriv__: DPCHIM failed with ierr = %i",
ierr);
octave_idx_type columns(void) const
octave_idx_type numel(void) const
Number of elements in the array.
const T * data(void) const
Size of the specified dimension.
octave_idx_type rows(void) const
const T * fortran_vec(void) const
Size of the specified dimension.
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
subroutine dpchim(N, X, F, D, INCFD, IERR)
void error(const char *fmt,...)
#define F77_XFCN(f, F, args)
octave_f77_int_type F77_INT
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE const F77_INT F77_INT & ierr
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE const F77_INT & incfd
octave_value::octave_value(const Array< char > &chm, char type) return retval
subroutine pchim(N, X, F, D, INCFD, IERR)