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 次查看(过去 30 天)
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 个评论
Istvan
Istvan 2017-7-19
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by