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/nllist.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/nlfit/nllist.x')
-rw-r--r-- | math/nlfit/nllist.x | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/math/nlfit/nllist.x b/math/nlfit/nllist.x new file mode 100644 index 00000000..d96351c9 --- /dev/null +++ b/math/nlfit/nllist.x @@ -0,0 +1,30 @@ +# NL_LIST -- Procedure to order the list used when the NLFIT structure +# is initialized. + +procedure nl_list (list, nlist, nfit) + +int list[ARB] # list +int nlist # number of elements in the list +int nfit # number of active list elments + +int i, j, nfitp1, ifound + +begin + nfitp1 = nfit + 1 + + do i = 1, nlist { + ifound = 0 + do j = 1, nfit { + if (list[j] == i) + ifound = ifound + 1 + } + if (ifound == 0) { + list[nfitp1] = i + nfitp1 = nfitp1 + 1 + } else if (ifound > 1) + call error (0, "Incorrect parameter ordering in plist") + } + + if (nfitp1 != (nlist + 1)) + call error (0, "Incorrect parameter ordering in plist") +end |