Earlier this month, I was looking for a quick way to fit an ellipse for a set of points. I did some searching around and this paper looked most promising. The explanation looked fairly interesting. The best part, however, is that the paper provides a MATLAB implementation for the algorithm that Fits an ellipse in Canonical form Ax2+Bxy+Cy2+Dx+Ey+F=0