The Nelder-Mead simplex method for function minimization is used for fitting a model function to a set of data. A best-fit set of parameters is obtained directly. A quadratic approximation of the least squares function surface in the neighborhood of the minimum gives the information matrix and thus the variance-covariance matrix and the standard deviations of the parameters (not given directly the by simplex method). Alternating cycles of simplex minimization and quadratic approximation more efficiently converge on the function minimum. The program is stable enough to survive an undergraduate laboratory. A version of it has moved with me from Fortran on a main frame, to Fortran on a mini, to CP/M basic, to CP/M C, and to UNIX. Perhaps others will find it as handy to have around as I have. The documentation should be sufficient for relatively painless use of the program -- including the minimal coding needed for fitting one's own special functions and data. Some of the documentation perhaps shows that it comes from handouts for undergraduates. There is a man page. To view it: unshar this package (if not done yet) make manpage To print it, set P in the makefile and: make printmanpage The program reads an ascii file to get control values, starting parameter estimates, and data. For pointers on how to construct such a file, see Input.doc and the sample input files, linefit.dat and ldhfit.dat. Two test functions are coded in ldhfit.c and linefit.c. To compile and try them out, from the directory in which this package was unshared:: make make testline make testldh Each test produces an output file, which is diff'd against each of two "standard" results files, which are supplied with the package and were generated on different systems (under SysV on an AT and 4.3BSD on a Vax 8650). Precision and rounding vary with the system, and are apparent even in these relatively simple calculations, so perhaps one should not be surprised if the test output agrees with neither of the "standards". However, the differences should be of course small and consistent with the precision expected. To see the use of alternating cycles of simplex minimization and quadratic approximation, compare ldhfit.testx, generated by simplex minimization only (quad_test set at 0), with ldhfit.test1, generated with alternating simplex and quadratic approximation. John Rupley uucp: ..{uunet | ucbvax | cmcl2 | hao!ncar!noao}!arizona!rupley!local internet: rupley!local@megaron.arizona.edu (H) 30 Calle Belleza, Tucson AZ 85716 - (602) 325-4533 (O) Dept. Biochemistry, Univ. Arizona, Tucson AZ 85721 - (602) 621-3929