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

Zeros in a data set

  1. Feb 14, 2008 #1
    Hi,
    does anyone know of some nice root-finding method (preferable GSL :-)) for a data set - i.e. I have a set of 3D data (x,y,z) where z = f(x,y,) and I want to know where the zeros of f are. I guess, I could write it myself with some interpolation method, but just in case someone knows...
     
  2. jcsd
  3. Feb 14, 2008 #2

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    If you have the function only in terms of triples, then the best you can do is search for:
    1. Values of z which are actually equal to zero.
    2. Sign changes from one value of z to the next.
     
  4. Feb 14, 2008 #3
    yeah, but I'd like to know where exactly the points are, so the method I'm searching for should be using some kind of interpolation and then find the zeros.
     
  5. Feb 14, 2008 #4

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    Ah. Well this depends on the assumptions you make about the data. You could do a linear (or quadratic, or cubic, or some other polynomial) local fit/spline, or you could choose any of a number of other types of fits.

    There's a free ("as in beer") program out there called CurveExpert that does this reasonably well, if you'd like to try it.
     
  6. Feb 14, 2008 #5

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?