griddata
- :
vq =griddata(x, y, v, xq, yq)¶ - :
vq =griddata(x, y, v, xq, yq, method)¶ - :
[xq, yq, vq] =griddata(…)¶ - :
vq =griddata(x, y, z, v, xq, yq, zq, …)¶ Interpolate scattered 2-D data at query points.
The vectors x, y and v give the sites and their values (v may be complex for the linear and nearest methods). If xq and yq are vectors of different orientation (one row, one column) the result is the grid of size
[numel(yq), numel(xq)]; otherwise they must have the same size, which vq takes.The method is one of
"linear"(default)Piecewise linear interpolation on the Delaunay triangulation of the sites. Queries outside their convex hull give NaN.
"nearest"The value at the nearest site.
"v4"Biharmonic spline interpolation using the Green’s function
g(r) = r^2 (log (r) - 1). It is defined everywhere."natural"Sibson natural neighbor interpolation. It is continuous and NaN outside the convex hull of the sites.
The method
"cubic"is not implemented and raises an error.With seven or more arguments the call is forwarded to the three-dimensional version,
griddata3.