I would like to know how to fit a bunch of (x,y) points in an ellipse shape. I've got two vectors, both the same size [1001,1], but I don't know how to fit an ellipse. Every time I tried the least squares it ends in some different approximation. I was using trigonometric polynomials by the way.
Here is an image of the graphic plot.
I will appreciate any help :)
Image plot: https://i.stack.imgur.com/P4vnt.png