[Xc,Yc,A,B,Phi,P]=ELLIPSEFIT(X,Y) finds the least squares ellipse that best fits the data in X and Y. X and Y must have at least 5 data points.
参考文献上R. Halif and J. Flusser, "Numerically Stable Direct Least Squares FItting of Ellipses," Department of Software Engineering, Charles University, Czech Republic, 2000.