Documentation |
Data gridding and hypersurface fitting (dimension ≥ 2)
yi = griddatan(x,y,xi)
yi = griddatan(x,y,xi,method)
yi = griddatan(x,y,xi,method,options)
yi = griddatan(x,y,xi) fits a hyper-surface of the form y = f(x) to the data in the (usually) nonuniformly-spaced vectors (x, y). griddatan interpolates this hyper-surface at the points specified by xi to produce yi. xi can be nonuniform.
X is of dimension m-by-n, representing m points in n-dimensional space. y is of dimension m-by-1, representing m values of the hyper-surface f(X). xi is a vector of size p-by-n, representing p points in the n-dimensional space whose surface value is to be fitted. yi is a vector of length p approximating the values f(xi). The hypersurface always goes through the data points (X,y). xi is usually a uniform grid (as produced by meshgrid).
yi = griddatan(x,y,xi,method) defines the type of surface fit to the data, where 'method' is one of:
method string | Description | Continuity |
---|---|---|
'linear' | Triangulation-based linear interpolation (default). | C^{0} |
'nearest' | Nearest neighbor interpolation. | Discontinuous |
All the methods are based on a Delaunay triangulation of the data.
If method is [], the default 'linear' method is used.
yi = griddatan(x,y,xi,method,options) specifies a cell array of strings options to be used in Qhull via delaunayn.
If options is [], the default options are used. If options is {''}, no options are used, not even the default.