I have a data list and a function being to be fitted to the data to get parameters of the function as below. I can't find the parameters a, b, c, d with different below methods. Can you help me to find the parameters?
Datafit = {{105., 0.472263}, {110., 0.665252}, {115., 0.909801}, {120.,
1.21304}, {125., 1.58227}}
Model=Exp[a + b/x + c*x + d*x*x]
1st try
FitC = NMinimize[datafit,
Exp[a + b/x + c*x + d*x*x], {{a, -1.7}, {b,
3.57}, {c, -0.99}, {d, -3.38}}, x]
{A4, B4, C4, D4} = {a, b, c, d} /. FitC
2nd try
FitC2 = FindFit[datafit, Exp[a + b/x + c*x + d*x*x],
x, {{a, 10}, {b, 0}, {c, 0.99}, {d, 3.38}}]
3rd try
FitC3 = NonlinearModelFit[
datafit, {Cox[a, b, c, d, x]}, {{a, 7}, {b, 80}, {c, 4}, {d, 1}},
x, MaxIterations -> 10000];
Can you help me to find parameter a, b, c, d of the model for the given data set?
NMinimize
is not correct. You need to feed it a single function and it doesn't take starting values but does accept constraints. TrynminFunction = Total@Map[(modelFun[#[[1]]] - #[[2]])^2 &, datafit]
and thenNMinimize[ { nminFunction, 9 < a < 10, -900 < b < -800, -.03 < c < -.02, 0.00006 < d < 0.00008 }, {a, b, c, d}]
$\endgroup$