diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /math/nlfit/nlzeror.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/nlfit/nlzeror.x')
-rw-r--r-- | math/nlfit/nlzeror.x | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/math/nlfit/nlzeror.x b/math/nlfit/nlzeror.x new file mode 100644 index 00000000..1cceba31 --- /dev/null +++ b/math/nlfit/nlzeror.x @@ -0,0 +1,34 @@ +include "nlfitdefr.h" + + +# NLZERO -- Zero the accumulators and reset the fitting parameter values to +# their original values set by nlinit(). + +procedure nlzeror (nl) + +pointer nl # pointer to nl fitting structure + +int nparams # number of parameters +int nfparams # number of fitted parameters + +begin + # Get number of parameters and fitting parameters. + nparams = NL_NPARAMS(nl) + nfparams = NL_NFPARAMS(nl) + + # Clear temporary array space. + call aclrr (ALPHA(NL_ALPHA(nl)), nfparams * nfparams) + call aclrr (COVAR(NL_COVAR(nl)), nfparams * nfparams) + call aclrr (CHOFAC(NL_CHOFAC(nl)), nfparams * nfparams) + call aclrr (BETA(NL_BETA(nl)), nfparams) + + # Clear space for derivatives and trial parameter vectors. + call aclrr (DERIV(NL_DERIV(nl)), nparams) + call aclrr (TRY(NL_TRY(nl)), nparams) + + # Reset parameters. + call amovr (OPARAM(NL_OPARAM(nl)), PARAM(NL_PARAM(nl)), nparams) + call aclrr (DPARAM(NL_DPARAM(nl)), nparams) + + NL_SCATTER(nl) = real(0.0) +end |