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.

    0 nearest—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.

  • c1ddbl.png Xi

    Xi is the x-coordinates of the new points where the VI computes interpolated values at Zi.

  • c1ddbl.png Yi

    Yi is the y-coordinates of the new points where interpolated values compute at Yi.

    The size of Yi must equal the size of Xi.

  • i1ddbl.png Zi

    Zi returns the interpolated values of the new points that correspond to the Xi and Yi 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