They were written by John Powers and C. B. Wilson of the TI Graphics Team and are released to the public domain. You may copy and change these programs.
Nonlinear optimization is a very valuable tool, especially for modeling and regression.
The Nelder-Mead method is one of the most robust and therefore very suitable for experimentation and use on a wide range of problems. You may store data in variable names of your choice, but the parameters to be optimized in your model must be in list L1. In addition to program FUNC, you may want to have a setup program which sets up data, stopping tolerance, etc. This value is used to perturb your initial guess to form the simplex and initialize the process. The equation for F uses the sum of squared error as the minimization function.