Member of the approximation class.
z2 = interp2(z1, times)
z2 = interp2(z1, x2, y2)
z2 = interp2(x1, y1, z1, x2, y2)
z2 = interp2(x1, y1, z1, x2, y2, method)
Interpolates z-values based on sample data using a specified method.
| Name | Description | ||||||||
| z1 | Specifies the sample z-values. z1 is a real, double-precision matrix. | ||||||||
| times | Specifies the number of times LabVIEW must interpolate recursively between the given points. Specifically, LabVIEW adds 2^(times)-1 points between each given set of points. times is an integer. | ||||||||
| x2 | Specifies the x-values at which you want to interpolate z-values. x2 is a real, double-precision vector. | ||||||||
| y2 | Specifies the y-values at which you want to interpolate z-values. y2 is a real, double-precision vector. | ||||||||
| x1 | Specifies the sample x-values. If you do not specify x1, LabVIEW sets x1 to the values of 0 ... m-1 where [m, n] equals size(z1). x1 is a real, double-precision vector. | ||||||||
| y1 | Specifies the sample y-values. If you do not specify y1, LabVIEW sets y1 to the values of 0 ... n-1 where [m, n] equals size(z1). y1 is a real, double-precision vector. | ||||||||
| method | Specifies the interpolation method to use. method is a string that accepts the following values.
|
| Name | Description |
| z2 | Returns the z-values interpolated at the values of (x2, y2). z2 is a real, double-precision matrix. |
Z1 = zeros(10, 10);
for i = 1:10
for k = 1:10
Z1(i, k) = i^2+4*i+3*k^4-2*k;
end
end
Z2 = interp2(Z1, 2);