-->ellipfit
function [Xc,Yc,a,b] = ellipfit(Xp,Yp,Po)
Looks for the best circle or ellipse fitting some given 2D data points
ellipfit : Displays this help
ellipfit circle : Runs a randomized circle-fitting demo.
ellipfit ellipse : Runs a randomized ellipse-fitting demo.
Some difficult cases may fail (without fine initial params)
[xc, yc, r] = ellipfit(Xp,Yp [,Po]) :
[xc, yc, a, b] = ellipfit(Xp,Yp [,Po]) :
Xp: Row or column of abscissae of points
Yp: Row or column or ordinates of points (same length than Xp)
xc, yc: Coordinates of the center of the best fitting circle | ellipse
r: Radius of the best fitting circle
a: Horizontal radius of the best fitting ellipse
b: Vertical radius of the best fitting ellipse
Po: Optionnal vector of initial parameters (best guess).
It may have from 1 to 4 elements, in this order:
[xc0 yc0 r0] or [xc0 yc0 a0] or [xc0 yc0 a0 b0]