Fit data to part of an ellipse

6 views (last 30 days)
nk1129
nk1129 on 10 Aug 2019
Edited: Bruno Luong on 10 Aug 2019
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:
Screen Shot 2019-08-09 at 10.33.36 PM.png

Answers (1)

Bruno Luong
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.

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!