I'd like to fit an ellipse with the equation of
$ x^2 + ay^2 + bx + c =0 $
This is basically the equation of an ellipse with no tilt and with its center on the horizontal axis.
I have some examples of how to fix curve on the general for of an ellipse, but I do not know how to apply the mentioned constraints. Can anyone kindly guid me on this or refer me to a page or document?
Thanks in advance.
If you have some $(x,y)$ points (at least $3$) and you want an exact fit, you have to solve the system of equations in three unknowns $a$, $b$, $c$ that you get by plugging in these values for $x$ and $y$. If you have more points than equations and the fit is not necessarily exact, you might do linear least squares.