On Fri, 30 Apr 1999, Markus Weiss wrote: > Hi, > > I like to fit a function of two values f(x,y) with 3 parameters > to datapoints of > > x1, y1, f1 > x2, y2, f2 > .... > > I tried the ntuple-class, and TF2 for the usersupplied function, > but seem not to get the desired result. Basically I'm lost... > > Has anyone solved this rather simple problem ? > > Thanks, Markus. > > -- > --------------------------------------------------------------------- > Markus Weiss "Ah elbereth glithoniel > BESSY-2 Projektteam silvren penna miriel" > e-mail: weiss@abbe.exp.bessy.de phone: +49-30-6392-2941 > --------------------------------------------------------------------- > Hi Markus, I hope Rene agrees with the following syntaxe. In the 2dim-hist case and a usersupplied function as, e.g. a 2dim Polynome of 1st degre one can write: TH2F *Hr ; // the 2-dim host ... pol = new TF2 ("pol","[0]*x + [1]*y + [2]", xmin, xmax, ymin, ymax) ; pol->SetParNames("Ax","Ay","B") ; hr->Fit("pol","R0") ; Cheers, Faouzi F. Attallah GSI mbH Planckstr 1 D-64291 Darmstadt Tel: +49 (0)6159 71 2743 Fax: +49 (0)6159 71 2901 Email: F.Attallah@gsi.de
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:32 MET