Constrain a linear fit pass through specific points

How do I force the linear fit to pass through a specific points (as two reference point)?

two points define a line :wink:

@Eddy_Offermann Well, the "TLinearFitter " class description says:

Linear fitter is used to fit a set of data points with a linear combination of specified functions. Note, that “linear” in the name stands only for the model dependency on parameters, the specified functions can be nonlinear.

In general, “fixing” two points should reduce the number of parameters by two (two parameters can be expressed as combinations of the remaining ones).
Of course, if the total function is just a “straight line”, there is nothing to fit anymore.

Oops, that was too fast; the two points threw me off :wink:

If you want a fit to go through two points, the best thing you can do is putting their weights “infinite”. However, given the functional expression, it might not be possible to have the fit go through both points simultaneously.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.