Does fitting in root have an option to set boundary conditions on a fit? I know you can fix a parameter, but in my specific case, that would not work. Just to use a simple example, lets say I know my data will be y = 100 at x = 10 and want the fit to consider that. If my fit equation is y = ax + b then there are multiple different parameter values of a and b for which at x = 10, y = 100. Does root have a way to set a boundary condition like this?
“Fitting” a single point with a line
y = ax +b has, as you said, an infinite number of possible values for
b. You’ll need at leat a 2nd point. Is it what you call “boundary conditions”?
No sorry, I realize now my phrasing in my original post was bad.
By “my data” I meant a large amount of data points that I expect to be modeled as y = ax + b, but I also know it to be y = 100 at x = 10. Basically I want to tell my fit, “Your parameters of a and b are still free, but no mater what you end up fitting you MUST have them such that at x = 10, y = 100”.
Ah ok, That’s more clear. I am sure @moneta knows the answer.
So, you just have one “free parameter”, e.g.: y = a*(x - 10) + 100