ROOT Version: 5
Platform: Ubuntu
Hello. Yes, I am on ROOT 5 – because our teacher demands the older version… So I can’t update.
I’m trying to calculate mean of X of a TF2D function. Let’s say for x and y both in [0, 1].
double func(double *x, double *params)
{
return TMath::Sin(x[0] * x[1]);
}
TF2* funcTF2 = new TF2("funcTF2", func, 0, 1, 0, 1, 0);
double meanX = funcTF2->Mean2X(0, 1, 0, 1);
This throws an error:
Error in <TFormula::Compile>: Empty String
Error in <TF2::TF2>: function: TF2_ExpValHelper/density_tf2*pow(x,1.000000)*pow(y,0.000000) has 0 parameters instead of 2