Dear ROOT expert:
I want to fit a line like this:
y = par[0]* x **2 (x<par[2])
y = par[1] *x **3 (x >=par[2])
how can I apply this in root fit function?
Thanks,Gang
Dear ROOT expert:
I want to fit a line like this:
y = par[0]* x **2 (x<par[2])
y = par[1] *x **3 (x >=par[2])
how can I apply this in root fit function?
Thanks,Gang
The solution is found.
Thanks,Gang
This is an old question, but does anyone know how to do this?
{
TF1 *f = new TF1("f", "((x < [2]) ? [0] : [1] * x) * x * x", 1., 7.);
f->SetParameters(3., 4., 5.);
f->Draw();
gPad->SetLogy();
}
Thanks! That worked perfectly!