Home | News | Documentation | Download

Root have any built in tools to sample from a fitted function?

HI,

I made a fit using root and now I want to sample points from the fitted function. Does root have any tool to do that?

Best Regards,
Cesar.

your_function->Eval(some_x)

1 Like

Thank you Wile. The some_x is the number of samples taken from the function?

I read the documentation, this Eval() it evaluates the function at that particular x. But I want to do is a sampling of the function. But I don’t know if root have a tool for that or if a gonna have to write a code for that.

TF1::GetRandom

1 Like

Exactly what I was looking for. Thank you!