Consider the following data:
TableDat = {{0.1, 0.1}, {0.2, 0.3}, {0.3, 0.55}, {0.5, 1}, {0.6,
1.17}, {0.8, 1.5}, {0.9, 1.6}, {1, 1.5}, {1.1, 1.3}, {1.25,
1.}, {1.35, 0.8}, {1.5, 0.5}};
ListPlot[TableDat]
I would like to fit it with a smooth function:
fit = NonlinearModelFit[TableDat, a*x + b*x^2 + c, {a, b, c}, x]
Show[Plot[fit[x], {x, 0.1, 1.5}], ListPlot[TableDat]]
However, additionally, I want the value of the fitting function at x = 0.9 to match the data exactly. Is there a possibility to modify NonlinearModelFit
to include this condition? A naive way would be to manually express c as a function of a,b from the condition a*x+b*x^2+c==1.6
at x = 0.9, but what about an automated way?