Can I use the fit() function to fit an ellipse on x,y data (covers only a part of the ellipse, not equally distributed around it) ? Could you please tell me how to do this? Thank you!

1 Ansicht (letzte 30 Tage)
Can I use the fit() function to fit an ellipse on x,y data (covers only a part of the ellipse, not equally distributed around it) ? Could you please tell me how to do this?
I cannot enter the equation to fit() because the equation of an ellipse ( (x-x0)^2/(a^2) + (y-y0)^2/(b^2) = 1 ) cannot be brought to a y = f(x) form...
If I cannot do it by fit(), is there ant other simple way?
I need: the center (x0,y0), the equation and the peak value (highest y).
Thank you!
  1 Kommentar
Istvan
Istvan am 19 Jul. 2017
fit_ellipse() ( https://uk.mathworks.com/matlabcentral/fileexchange/3215-fit-ellipse ) fails, saying: Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. > In fit_ellipse (line 155) stopped because of a warning regarding matrix inversion
... and
EllipseDirectFit ( http://uk.mathworks.com/matlabcentral/fileexchange/22684-ellipse-fit--direct-method- ) will not work, as this solution expects to have data all around the ellipse. I only have data on about 30% of it.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by