Hi Dan, If you are using recent ROOT you can use TMath::Poisson function in TFormula. And for factorial you can use TMath::Gamma function, e.g. TFormula factorial("factorial","TMath::Gamma(x+1)"); factorial.Eval(10) (Double_t)3.62880000000318652e+06 or to define Poisson PDF: TF1 poiss("poiss","[0]*TMath::Poisson(x,[1])",0,5); poiss.SetParameter(0,1); poiss.SetParameter(1,1); poiss.Draw() Best regards, Stanislav. On Wed, 5 Nov 2003, Dan Holmes wrote: > Hello, > > my problem for today is that i would like to define a TFormula with a > factorial in it (poisson distribution) with the aim of being able > to evaluate and integrate it at non-integer points.. > > i have a bit of c++ code that works out factorials but i want to be able > to define the formula and plot it as a function.. > > do you have any examples of this? > > cheers, > > Dan. > > > > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET