Interpolates or extrapolates f at x value using a rational function. The rational function passes through all the points formed by Y and X.


icon

Inputs/Outputs

  • c1ddbl.png Y

    Y is the array of dependent values.

  • c1ddbl.png X

    X is the array of independent values. If the number of elements in the X is different from the number of elements in the Y, the VI sets the output interpolation value and interpolation error to NaN and returns an error.

  • cdbl.png x value

    x value specifies the point at which the interpolation or extrapolation is performed. If x value is in the range of X, the VI performs interpolation. Otherwise, the VI performs extrapolation.

    If x value is too far from the range of X, the extrapolation error may be large. It is not a satisfactory extrapolation.

  • idbl.png interpolation value

    interpolation value is the interpolation of the function f at x value.

  • idbl.png interpolation error

    interpolation error is an estimate of the error in the interpolation.

  • 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.

  • The rational function

    passes through all the points formed by Y and X. P and Q are polynomials, and the rational function is unique, given a set of n points (xiyi), where f(xi) = yi, f is any function, and given a number x in the range of the xi values.

    This VI calculates the output interpolation value y using

    If the number of points is odd, the degrees of freedom of P and Q are using . If the number of points is even, the degrees of freedom of P are , and the degrees of freedom of Q are , where n is the total number of points formed by Y and X.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Mathematics\Interpolation\Interpolation Solver.vi