Hi I am trying to fit
TF1 *func = new TF1("fitf","[3] + [2]*x + [0]/TMath::Sqrt(x + [1])", 50, 1400);
func->SetParNames("a","b","c", "d");
to a set of four (x,y) points
The fit results shows
***************************************
Minimizer is Minuit / Migrad
Chi2 = 152.672
NDf = 0
Edm = 1.27128e-07
NCalls = 272
a = -667829 +/- 3978.14
b = 2501.96 +/- 27.8618
c = -1.19202 +/- 0.0117273
d = 13044.7 +/- 11.1118
Showing the degrees of freedom to be 0 can someone please help me what I am messing here?
Further, if I change the initial parameters very slightly the fit seems to get upset as evident from
Warning in <Fit>: Abnormal termination of minimization.
****************************************
Invalid FitResult (status = 4 )
****************************************
Minimizer is Minuit / Migrad
Chi2 = 154.198
NDf = 0
Edm = 0.61487
NCalls = 1490
p0 = -636027 +/- 14397.5
p1 = 2435.92 +/- 32.2021
p2 = -1.16013 +/- 0.0250483
p3 = 12578.4 +/- 231.218
Thanks a lot
Edit 1: I guess ndf =0 since the number of data points are equal as fit parameters but is there any way around to fit these points ?