Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Software for finding a best-fit ellipse (please help)?

  1. Apr 7, 2015 #1
    Hello all, I'm calibrating a magnetometer sensor. An uncalibrated sensor will output values that will graph an ellipse. A calibrated sensor will output values that will graph a circle. Since there's data points all over the place, I'd like to find a piece of software that will take my data and give me a best-fit ellipse, with its equation, and with this I'll be able to calculate the eccentricity and see whether my calibrations actually worked.
    I'm not versed in coding whatsoever, so I would prefer if there was some sort of .exe program I could use that would automatically calculate based off my values.
    I've attached an picture of the type of data I'm dealing with.
     

    Attached Files:

  2. jcsd
  3. Apr 7, 2015 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    This would normally be done with a math package and hand-writing the code.
    http://www.emis.de/journals/BBMS/Bulletin/sup962/gander.pdf

    There are dedicated libraries for this it seems - for the googling. i.e.
    http://www.codeproject.com/Articles/692787/Best-fitting-line-circle-and-ellipse
    ... but you are not so much of a programmer... hmmm...

    For ready-to-use I'd suggest the Matlab function "fit_ellipse"
    http://www.mathworks.com/matlabcentral/fileexchange/3215-fit-ellipse
    ... you can also get matlab to calculate the eccentricity and just output that.

    I would not expect to find a purpose built windows executable for your purpose - I think I saw a geology program "ellipsefit" a while ago tho - it is the kind of functionality that gets built into math programs and you are encouraged to learn to use at least one of Matlab, Mathematica, GNU Octave. I know that seems like overkjill for just this one task but it pays off in the long run.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Software for finding a best-fit ellipse (please help)?
  1. Curve fitting software (Replies: 5)

Loading...