Hello. I’m having some difficulties fitting a TGraphErrors to a not very complicated function.
I am using
TF1 *f1 = new TF1("f1","[0] + [1]*cos([2]*x)",40,60);
gr->Fit("f1")
The graph is not at all complicated and the fit should be easy. However, root is setting parameter [2] to 0.
Am I making an obvious mistake?
Thanks!