Hello,
I would like to know the number of free parameters of a TF1 fit function. So, the number of parameters minus the number of parameter that I fixed with TF1::FixParameter. Is it possible to obtain that number from somewhere?
I can’t find a method anywhere - it even appears as if the chi2 that you get after fitting to a histogram doesn’t take into account that some parameters may be fixed!
(I’m using root 3.05/04 on Red Hat 7.3)
Thanks,
Paul
====
root [0] TF1 *f1 = new TF1(“f1”,"[0]xsin([1]*x)",-3,3);
root [1] f1->GetNpar()
(const Int_t)2
root [2] f1->SetParameters(1,2)
root [3] f1->Draw()
TCanvas::MakeDefCanvas: created default TCanvas with name c1
root [4] f1->GetNpar()
(const Int_t)2
root [6] f1->FixParameter(0,1)
root [7] f1->GetNpar()
(const Int_t)2