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

    This would normally be done with a math package and hand-writing the code.

    There are dedicated libraries for this it seems - for the googling. i.e.
    ... but you are not so much of a programmer... hmmm...

    For ready-to-use I'd suggest the Matlab function "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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook