Close This Window

Please download official ILL logos here


For using on the web or on a screenFor printing in high resolutionWhite version, for dark backgrounds

Download PNG

Download AI

Download white PNG

Download JPG


Download white AI


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.

Back to ILL Homepage
English French Deutsch 

All Software

Version 4.2. (1999)

Choosing a fitting function

The Matlab functions which calculate the model functions you fit to data are called fitting functions. The procedure for choosing a fitting funtion is similar to that for choosing a load function: you pick a function from those listed on the control window 'Fit Functions' menu:

The functions listed are those that Mfit read from the mfit.ini file when it started. Choose the function you want by clicking on it. You can choose an unlisted function by choosing 'Other...' and then using the dialog that appears to tell Mfit about your function. Mfit show the currently selected fit function in the control window. It is possible to build a more complex function (such as a gaussian plus a lorentzian, convoluted with an experimental resolution function) with the multifunction feature.

If Mfit successfully loads the fit function, it opens a parameters window which shows the values of the parameters associated with the particular function. The parameters windows looks something like this:

The number and names of the parameters of course depends on the function you chose, and the boxes will be blank when you first load a function.

Next: Fitting.
See also: Mfit batch files , The mfit.ini file , Building a complex fitting function , How to write fitting functions.