I Can’t fit data with TF2

I’m analyzing data representing the coordinates of a star over the year.
I write the code creating a graph with TGraphError. Then I want to fit my data with the generic conic equation but when I define the function for fitting data with TF2, then root say “unknown function”. How can I define it correctly?

Hi,
Is your data containing 2 observations (x,y) and one dependent variable (z) or one observation and one dependent variable ?
In the first case you need to use a TGraph2DErrors and you should fit with a TF2 function.
In the second case you can use a TGraphError and you should use a TF1 function and not a TF2.

Lorenzo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.