fixing a start value for (exponetial) fitting

Hello,

I'm wondering if there is a way (command) to define a start value for a given fit function (in my case I'm interested especially in exponential fit functions). So being able to force the fit function to cross this point.

With best regards, Lars
I'm not sure what you mean by "fix a start value", but here are some points.

1. You can fix the fitting range (start/end point) either by using the curve fit dialog (second tab) or you can specify the range using wave notation.
curvefit exp_xoffset wave1[2,200] //only fit the range from point 2 to point 200

2. If instead you wish to fix a parameter of the fit (such as the y-offset), use the /H flag (1 = hold, 0 = fit)

3. If you're asking about enforcing the fit to go through a specific x-y point ("force the fit function to cross this point"), I don't know if this is possible.
Thanks for the answer and yes I guess I was a bit unspecific here. I was referring to point 3) you mention.
Two approaches for point number 3:

1. You could solve the algebra and derive a new functional relationship between y and x that has one less degree of freedom due to the constraint. Then fit the new function
2. You could enter the fixed x0,y0 point as a measured data point for the fit with an extremely small error so that whatever your fit adjusts to come near the other data points, it will pass extremely close to the point.

I suspect 1 is the better approach, but you could experiment with 2 pretty easily if your fit is already set up.

2 sounds tempting from a purely algebraic view, but I think the limited range of actual floating point numbers might make it not work very well. You cannot set the uncertainty to 0 exactly (which is essentially what you're saying when you say the fit must pass through a point) or Igor will give you an error. Set it finite but still too small and the fit may complain about singular errors, or conclude that it has reached the desired tolerance and quit iterating with what is still clearly not the best fit for the remaining points because the "constraint point" dominates the calculation of chi squared. Set it too large and it will act like a normal data point...the fit routine will weight the "fixed" point more heavily than the others but won't necessarily force the fit function to pass close enough to it for your requirements.
ikonen wrote:
Two approaches for point number 3:

1. You could solve the algebra and derive a new functional relationship between y and x that has one less degree of freedom due to the constraint. Then fit the new function


The algebra in this case is easy enough, if you first shift the data so the fixed point is at x=0. If it's just an exponential fit without a baseline, then all you need to do is hold one parameter, which you can do within the Igor curve fitting user interface.
In general, if algebraic elimination is not practical, the alternative to "soft constraints" is the technique of Lagrange multipliers: you add a degree of freedom multiplied with the error term, and then solve a bigger system in which this additional degree of freedom ends up being the force needed to enforce the constraint. That's not something you can do within the curve fitting interface, however.

If you want to go with soft constraints, I would recommend doing a convergence study, where you plot the fit parameters versus the (logarithm of the) weight coefficient for the "constraint point", so at least you see what's going on with the changes in the weight coefficient.