|
|
|
Pour utiliser sur le web | Pour imprimer en haute résolution |
|---|---|
Télécharger PNG | Télécharger TIF |
Télécharger JPG | Télécharger EPS |
The Computing for Science (CS) group supports ILL scientists, students and visitors in a number of activities including data analysis, instrument simulation and sample simulation.

Writing your own fitting routinesNon-linear fitting algorithms usually begin with a starting guess for the function parameters that minimize some target function (usually chi squared), and then attempt to improve upon the initial values by an iterative procedure. Different algorithms do this in different ways, and may also estimate the resulting uncertainties in the parameter values obtained in different ways. You can supply your own fitting routines which allows you to determine both the minimization algorithm and the target function. The Gradient routine supplied with Mfit is adapted from the Levenberg-Marquardt algorithm <tt>leasqr.m</tt> by Richard I. Shrager, A.Jutan, and Ray Muzic. A <tt>simplex</tt> method adapted from the matlab <tt>fmins</tt> function is also provided. Des McMorrow has also written a FORTRAN .mex file interface to the excellent CERN package MINUIT, but this is machine dependent, and so is not included. Function formatFitting routines are .m files (or .mex files - see the Matlab external interface guide) with the syntax:
The input parameters are:
and the function returns <tt>p</tt> and <tt>std</tt>, vectors containing the best fit estimates of the paramters, and the associated uncertainties respectively. |