Hello Rooters,
This macro:
void str(){
// define stretched exponential
Double_t stretched(Double_t *x,Double_t *par)
{
Double_t fitval = par[0]*TMath::Exp((-x[0]/par[1])**par[2]); // Double_t fitval = par[0] + par[1]*x[0]; return fitval;
TCanvas *can = new TCanvas("can","90040 stretched");
TF1 *func = new TF1("func", stretched, 1,300, 3);
func->SetParameters(184.87,44.69,0.87);
// func->SetParameters(1,10);
func->Draw();
can->Update();
}
generates this:
root [0] .x str.C
Error: operator '@' or '**' negative operand str.C:3:
with the last line repeated many times.
Can someone explain what I've done wrong?
root 5.14/00 gentoo linux.
Thanks,
Roger Received on Thu Mar 08 2007 - 21:31:14 CET
This archive was generated by hypermail 2.2.0 : Fri Mar 09 2007 - 05:50:01 CET