# Interpolate 1D (Hermite) (G Dataflow)

Performs one-dimensional interpolation by using the cubic Hermite interpolation method.

The cubic Hermite method has better locality than the spline method and the polynomial method.

##### Programming Patterns

You can reuse piecewise polynomial as an input to the Evaluate Interpolating Polynomial node to find the interpolated values.  ## x is monotonic?

A Boolean that specifies whether the values of the independent variable increase monotonically with the index.

 True The values of the independent variable increase monotonically with the index. This node does not sort x or reorder y. False The values of the independent variable does not increase monotonically with the index. This node sorts x to be in ascending order and reorders y accordingly.

Default: False ## y

Tabulated values of the dependent variable. ## x

Tabulated values of the independent variable. The length of x must equal the length of y. ## xi

Values of the independent variable at which this node computes the interpolated values of the dependent variables.

This input accepts a double-precision, floating-point number or a 1D array of double-precision, floating-point numbers. ## ntimes

Number of times that this node interpolates values repeatedly and evenly between each x element to generate xi used. ntimes determines the locations of the interpolation values.

This input yields interpolated values between every y element when xi is empty. The node ignores ntimes if you wire the xi input.

This input is available only if you wire an array of double-precision, floating-point numbers to xi.

Default: 1 ## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error  If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error ## yi

Interpolated values that correspond to the independent variable values.

This output can return a double-precision, floating-point number or a 1D array of double-precision, floating-point numbers. ## xi used

Values of the independent variable at which this node computes interpolated values of the dependent variable.

This output is available only if you wire an array of double-precision, floating-point numbers to xi.

If xi is empty, xi used returns 2ntimes *(N - 1) + 1 points with (2ntimes - 1) points located evenly between each two adjacent elements in x, where N is the length of x. If you wire the xi input, xi used equals xi. ## piecewise polynomial

Piecewise interpolating polynomial for the Evaluate Interpolating Polynomial node to reuse. ### x locations

Endpoint values of the x domain.

If x locations is of size N, the coefficients array should contain N - 1 rows of polynomial coefficients. ### coefficients

Coefficients of the interpolating polynomial.

Row i of coefficients contains the coefficients for the interpolating polynomial between elements xi and xi + 1 of x locations. ## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error  If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

## Understanding the Cubic Hermite Interpolation Method

The cubic Hermite interpolation method guarantees that the first derivative of the interpolant is continuous and sets the first derivative at the endpoints in order to preserve the original shape and monotonicity of the y data.

The cubic Hermite interpolation method is a piecewise interpolation. This method derives a third-order polynomial in Hermite form for each interval and ensures only the first derivatives of the interpolation polynomials are continuous. Compared with the cubic spline method, the cubic Hermite method has better locality. In other words, if you change one data point xj, the effect on the interpolation result lies in the range between [xj - 1, xj] and [xj, xj + 1].

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application