Example: Given two exponential decays of the form, z=f(x), each describing a different data set but having a common decay time, estimate the values of the parameters. If the datafile has the format x:z:s, then
f(x,y) = (y==0) ? a*exp(-x/tau) : b*exp(-x/tau) fit f(x,y) 'datafile' using 1:-2:2:3 via a, b, tau
For a more complicated example, see the file "hexa.fnc" used by the "fit.dem" demo.
Appropriate weighting may be required since unit weights may cause one
branch to predominate if there is a difference in the scale of the dependent
variable. Fitting each branch separately, using the multi-branch solution
as initial values, may give an indication as to the relative effect of each
branch on the joint solution.