Jan, You should set initial values for the parameters. ROOT can compute these initial values only for "gaus","pol" and "expo" Rene Brun Jan Malinowski wrote: > > Hi Rooters, > I have problem with fitting my data by power law function at this way: > > Elow=15.0; > Ehigh=500.0; > f1 = new TF1( "f1", "pow(10,[0]*x+[1])", log10(Elow), log10(Ehigh) > ); > f1->SetLineColor(4); > f1->SetLineWidth(1); > hist->Fit("f1","R"); > > I have received result like on the figure which I attached to my e-mail. > > The histogram 'hist' was rescaled earlier. > What is wrong in my code? > > Best regards, > Janek. > > -------------------------------------------------------------------------------- > > Name: fit.eps > fit.eps Type: Postscript Document (application/postscript) > Encoding: 8bit
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:10 MET