26#if defined (HAVE_CONFIG_H)
44DEFUN (__pchip_deriv__, args, ,
51 int nargin = args.
length ();
53 bool rows = (nargin == 3 && args(2).uint_value () == 2);
57 if (args(0).is_single_type () || args(1).is_single_type ())
65 error (
"__pchip_deriv__: X must be at least of length 2");
70 if (nx != (rows ? nyc : nyr))
71 error (
"__pchip_deriv__: X and Y dimension mismatch");
83 ymat.
data () + k * inc,
90 error (
"__pchip_deriv__: PCHIM failed with ierr = %"
91 OCTAVE_F77_INT_TYPE_FORMAT,
ierr);
99 Matrix ymat (args(1).matrix_value ());
104 error (
"__pchip_deriv__: X must be at least of length 2");
109 if (nx != (rows ? nyc : nyr))
110 error (
"__pchip_deriv__: X and Y dimension mismatch");
122 ymat.
data () + k * inc,
128 error (
"__pchip_deriv__: DPCHIM failed with ierr = %"
129 OCTAVE_F77_INT_TYPE_FORMAT,
ierr);
octave_idx_type numel(void) const
Number of elements in the array.
octave_idx_type rows(void) const
octave_idx_type columns(void) const
const T * data(void) const
Size of the specified dimension.
OCTARRAY_API T * fortran_vec(void)
Size of the specified dimension.
OCTINTERP_API octave_idx_type length(void) const
#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
subroutine pchim(N, X, F, D, INCFD, IERR)