Hello,
How do I extract fit parameters? I have a user defined function with 5 parameters
//In a fit.cxx file
double myformula( , )
{ code for formula }
double fitfunc(histoname, some more arguments)
{ code for fit. In here I call myformula and set parameters and parameter names.}
//In main program which creates histogram
#include fit.cxx
{ code which fills and draws histogram,
calls fitfunc, to fit histogram and draws fit }
Now on the ‘root’ shell, the parameters are printed out, but how can i extract these parameters?
Maybe declare an array in main funtion, pass into fitfunc and fill?
//E.g, in main prog:
double para[5];
fitfunc(histoname, arguments, para[5])
use the parameters
//while in fitfunc(TH1F histoname, type arguments, double ¶[5])
//after set parameters etc
para[0->4]= histoname -> GetParameters(0,1,2,3,4)
Will that do the job? I’ve tried but i get compilation errors. Oh what about the errors?
I saw a similar question asked in this post
http://root.cern.ch/phpBB2/viewtopic.php?t=289&highlight=extracting+parameters
But it wasn’t answered, so had to ask again