%%cpp -d #include "RConfigure.h" #ifdef R__HAS_MATHMORE #include "Math/MultiRootFinder.h" #else #error libMathMore is not available - cannot run this tutorial #endif #include "Math/WrappedMultiTF1.h" #include "TF2.h" #include "TError.h" using namespace ROOT::Math; const char * algo = nullptr; int printlevel = 1; ROOT::Math::MultiRootFinder r(algo); TF2 * f1 = new TF2("f1","[0]*(1-x)+[1]*y"); TF2 * f2 = new TF2("f2","[0]*(y-x*x)"); f1->SetParameters(1,0); f2->SetParameter(0,10); ROOT::Math::WrappedMultiTF1 g1(*f1,2); ROOT::Math::WrappedMultiTF1 g2(*f2,2); r.AddFunction(g1); r.AddFunction(g2); r.SetPrintLevel(printlevel); double x0[2]={-1,-1}; r.Solve(x0);