# Zeros in a data set

1. Feb 14, 2008

### r4nd0m

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. Feb 14, 2008

### CRGreathouse

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.

3. Feb 14, 2008

### r4nd0m

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.

4. Feb 14, 2008

### CRGreathouse

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.

5. Feb 14, 2008