What are the problems that arise when fitting (2D or 3D) a set of scattered data? (non uniformly distributed)

I had some data I had to fit and I solved the problem using the triscatteredinterp() matlab function which implements different types of methods: natural neighbor interpolations, linear interpolation and nearest-neighbor interpolation.

What I would like to understand is: what are the issues for this kind of fitting? Why should I choose a method instead of another one?

Another function is delaunay() which implements the Delaunay triangulation. What is the difference between this and the other methods?

  • 1
    $\begingroup$ Are you looking for a global fit, or local interpolation? In either case, what kinds of functions are you trying to fit? A linear function, polynomials, functions nonlinear in the parameters? $\endgroup$ Dec 9 '14 at 1:06
  • $\begingroup$ If 'global fit' means working with all the data it is what I meant. The data I had to fit were obtained experimentally and they showed a piece-wise linear trend $\endgroup$
    – Rhei
    Dec 9 '14 at 5:47
  • 2
    $\begingroup$ Do you want to interpolate the data or fit a model to the data? If the individual data points have measurement errors than you generally will want to fit some sort of smoothed model to the data rather than simply interpolating. $\endgroup$ Feb 4 '15 at 14:54

Your comment mentions that the data shows a piecewise linear trend. In that case it would be most accurate to use linear interpolation. The other options you asked about (nearest neighbor and natural neighbor) result in piecewise constant (generally discontinuous) interpolants. The trade off is that it is more computationally expensive to compute the linear interpolation than the others.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.