From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- math/nlfit/nlvectord.x | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 math/nlfit/nlvectord.x (limited to 'math/nlfit/nlvectord.x') diff --git a/math/nlfit/nlvectord.x b/math/nlfit/nlvectord.x new file mode 100644 index 00000000..34bce9a5 --- /dev/null +++ b/math/nlfit/nlvectord.x @@ -0,0 +1,23 @@ +include +include "nlfitdefd.h" + +define VAR (($1 - 1) * $2 + 1) + +# NLVECTOR -- Evaluate the fit for a series of data points. + +procedure nlvectord (nl, x, zfit, npts, nvars) + +pointer nl # pointer to nl fitting structure +double x[ARB] # independent variables (npts * nvars) +double zfit[ARB] # function values (npts) +int npts # number of points +int nvars # number of independent variables + +int i + +begin + # Compute the fitted function. + do i = 1, npts + call zcall5 (NL_FUNC(nl), x[VAR (i, nvars)], nvars, + PARAM(NL_PARAM(nl)), NL_NPARAMS(nl), zfit[i]) +end -- cgit