What's the difference between interp3 and scatteredinterpolant?

10 views (last 30 days)
They can both return values of a 3-variable function u(x,y,z), at query points xq,yq,zq, based on input sample point vectors, x, y, z.
Which should one use, and why?
(I know scatteredInterpolant is meant for 'scattered' data, but what kind of data may by defined as 'scattered'?)

Accepted Answer

Stephen23
Stephen23 on 18 Feb 2016
Edited: Stephen23 on 19 Feb 2016
The figures in the MATLAB documentation should help you to understand the difference:
In essence:
  • gridded data consist of data points at every node of an axis-aligned ND-grid. The functions ndgrid and meshgrid are often used to generate the (axis) indices for all of these points: you should look at their outputs.
  • scattered data consist of other data arrangements. Keep in mind that gridded data must include all data points on the grid: as soon as just one node is missing it becomes scattered data.
The choice is easy: do you have a data value for every node on some (N-D) grid?
yes -> gridded data
no -> scattered data.

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!