Main Content

Interpolation for 3-D gridded data in meshgrid format

returns
interpolated values of a function of three variables at specific query
points using linear interpolation. The results always pass through
the original sampling of the function. `Vq`

= interp3(`X,Y,Z`

,`V`

,`Xq,Yq,Zq`

)`X`

, `Y`

,
and `Z`

contain the coordinates of the sample points. `V`

contains
the corresponding function values at each sample point. `Xq`

, `Yq`

,
and `Zq`

contain the coordinates of the query points.

also
specifies `Vq`

= interp3(___,`method`

,`extrapval`

)`extrapval`

, a scalar value that is assigned
to all queries that lie outside the domain of the sample points.

If you omit the `extrapval`

argument for queries
outside the domain of the sample points, then based on the `method`

argument `interp3`

returns
one of the following:

The extrapolated values for the

`'spline'`

and`'makima'`

methods`NaN`

values for other interpolation methods