Member of the geometry class.
ZS = griddata(X, Y, Z, XS, YS)
ZS = griddata(X, Y, Z, XS, YS, method)
[XS, YS, ZS] = griddata(X, Y, Z, XS, YS)
[XS, YS, ZS] = griddata(X, Y, Z, XS, YS, method)
Fits a surface to the unevenly distributed sample points that you specify. The resulting fit passes through all the specified sample points.
| Name | Description | ||||||||
| X | Specifies the x-coordinates. X is a vector or a real matrix. If X is a vector, LabVIEW converts X into a matrix by repeating the vector. | ||||||||
| Y | Specifies the y-coordinates. Y is a vector or a real matrix of the same size as X. If Y is a vector, LabVIEW converts Y into a matrix by repeating the vector. | ||||||||
| Z | Specifies the z-coordinates. Z is a real matrix of the same size as X. | ||||||||
| XS | Specifies a real matrix of x-coordinates that represent the x-coordinates of the interpolation points. | ||||||||
| YS | Specifies a real matrix of y-coordinates that represent the y-coordinates of the interpolation points. | ||||||||
| method | Specifies the interpolation method to use. method is a string that accepts the following values.
|
| Name | Description |
| XS | Returns the input matrix XS unchanged. |
| YS | Returns the input matrix YS unchanged. |
| ZS | Returns a real matrix that represents the calculated surface at (XS, YS). |
X = rand(5, 5);
Y = rand(5, 5);
Z = X.^2+Y.^2;
[XS, YS] = meshgrid(0:0.1:1);
[XS, YS, ZS] = griddata(X, Y, Z, XS, YS, 'v4');
surf(XS, YS, ZS)