Home > Community > General > Fitting a circle > Antwort auf: Fitting a circle

Bernhard KantzBernhard Kantz

In this case you have to use your own user-defined function in the nonlinear curvefit analysis object.
The circe function is (x-x0)^2+(y-y0)^2 = R^2
For the upper half of the circle you could use the following FPScript function:

Dim x0 = p[0]
Dim y0 = p[1]
Dim R = p[2]
Sqrt(R^2 - (x-x0)^2) + y0