Fit data to part of an ellipse
6 views (last 30 days)
Show older comments
Hi - I have part of a data set that I'm trying to fit to a semi-oval whose major axis is along the x-axis. All of the functions I have found for generating an ellipse fit only work for complete ellipses. I have found an example that does what I need but for circles, and haven't been able to find one for ellipses. If anyone has code for this I'd appreciate it. Otherwise if anyone can explain how to adjust either the circle code or ellipsefit code to make it work for my situation (I'm a scientist trying to analyze data, the math behind this is confusing me a little). Heres a pic of my data for reference:

0 Comments
Answers (1)
Bruno Luong
on 10 Aug 2019
Edited: Bruno Luong
on 10 Aug 2019
Arbitrary oriented elllipse in this thread
If you want ellipse aligned with x/y you need to remove the cross term xc.*yc (or force P(3)==0) in the code.
Honestly your data doesn't look like an aligned ellipse.
0 Comments
See Also
Categories
Find more on Polynomials in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!