Performs two-dimensional interpolation on scattered points.

This VI accepts X, Y, and Z values (two independent variables and one dependent variable, respectively) and returns interpolated values Zi that correspond to each Xi and Yi location.

You must manually select the polymorphic instance to use.


icon

Inputs/Outputs

  • ci32.png method

    method sets the interpolation method.

    0nearest—Performs interpolation on the nearest points (non-smooth). This method finds the point closest to (Xi, Yi) and assigns the corresponding value in Z to Zi.
    1

    linear (default)—Performs linear interpolation on the selected triangle (non-smooth). This method triangulates the convex hull of (X, Y) and interpolates Zi for the points inside a triangle.

    (Xi, Yi) is valid only inside the convex hull of (X, Y). Otherwise, LabVIEW returns NaN.

    2

    cubic—Performs cubic interpolation on the selected triangle (smooth). This method triangulates the convex hull of (X, Y) and interpolates Zi for the points inside a triangle.

    (Xi, Yi) is valid only inside the convex hull of (X, Y). Otherwise, LabVIEW returns NaN.

    3

    biharmonic spline—Performs biharmonic spline interpolation (smooth). This method calculates 2D biharmonic spline interpolation using Green’s function.

    Refer to A Practical Guide to Splines in the Mathematics Related Documentation topic for more information about the biharmonic spline interpolation method.

  • c1ddbl.png Z

    Z is the value of the known points.

  • c1ddbl.png X

    X is the x-coordinates of the known points.

  • c1ddbl.png Y

    Y is the y-coordinates of the known points. X, Y, and Z must be the same size.

  • c2ddbl.png Xi

    Xi is a 2D array of the corresponding values of X. Both sets of corresponding interpolated values compute the dependent variable Zi.

  • c2ddbl.png Yi

    Yi is a 2D array of the corresponding values of Y. Both sets of corresponding interpolated values compute the dependent variable Zi.

    The size of Yi must equal the size of Xi.

  • i2ddbl.png Zi

    Zi is the 2D array of interpolated values that correspond to the Xi and Yi independent variable values.

  • ii32.png error

    error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Mathematics\Interpolation\Scattered 2D Interpolation.vi