Find a point that does not fit to ellipse from a set of (x,y) co-ordinates

1 回表示 (過去 30 日間)
Sreedu
Sreedu 2011 年 3 月 3 日
Hello,
I have a set of (x,y) points which I am trying to fit to an ellipse. I used the Ellipse fit function by Tal Hendel ( http://www.mathworks.com/matlabcentral/fileexchange/22423-ellipse-fit). Some times I get imaginary semimajor/minor axis. When I plotted these set of data using plot() function, I see that I get imaginary values because one of the points in the set does not fit to the ellipse while the other points form almost an ellipse. How can I eliminate this one point? Hope I made it clear.
  2 件のコメント
Paulo Silva
Paulo Silva 2011 年 3 月 3 日
That method doesn't always give reliable values, try other method or just remove the point, use the datacursor to find the coordinates of that point.
One option that allows you to remove the point:
x(x=value)=[];
y(y=value)=[];
Sreedu
Sreedu 2011 年 3 月 4 日
Thank you. Could you suggest any other method? Is there any uploaded file which I can use?

サインインしてコメントする。

回答 (1 件)

David Young
David Young 2011 年 3 月 3 日
If there is only ever one incorrect point, you could simply omit each point in turn until you get a good fit to an ellipse. (You need some way to check the residual errors to test for goodness of fit, beyond just looking for imaginary values in the result. You might need to modify the function you are using to provide that.)
A more general possibility is the RANSAC algorithm, described here: http://en.wikipedia.org/wiki/Ransac. This allows for there to be many incorrect points.

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by