STK Components for .NET 2022 r1

## InterpolatorInterpolate Method (Double, Double, Double, Int32, Int32, Int32, Int32, Int32) |

Interpolates values using this interpolation algorithm.

Syntax

public abstract double[] Interpolate( double x, double[] xTable, double[] yTable, int yStride, int inputOrder, int outputOrder, int startIndex, int length )

- x
- Type: SystemDouble

The independent variable for which the dependent variables will be interpolated. - xTable
- Type: SystemDouble

The array of independent variables to use to interpolate. The values in this array must be in increasing order and the same value must not occur twice in the array. - yTable
- Type: SystemDouble

The array of dependent variables to use to interpolate. There can be multiple values corresponding to each independent values in xTable. For a set of three dependent values (p,q,w) and their derivatives (dp, dq, dw) at time 1 and time 2 this should be as follows: {p1, q1, w1, dp1, dq1, dw1, p2, q2, w2, dp2, dq2, dw2}. - yStride
- Type: SystemInt32

The number of dependent variable values in yTable corresponding to each independent variable value in xTable. If inputOrder is greater than 0, this is also the number of first derivative values, second derivative values, etc. corresponding to each value in xTable. - inputOrder
- Type: SystemInt32

The number of dependent variable derivatives in yTable. If this value is 0, the yTable is assumed to contain only dependent variable values, with each yStride of them corresponding to a single independent variable in the xTable. If this value is 1, the yTable is assumed to contain not only the dependent variable values but also their derivatives. There are yStride dependent variable values followed by yStride dependent variable first derivatives corresponding to each independent variable value in xTable. Similarly if this value is 2, the yTable contains dependent values, first derivatives, and second derivatives. - outputOrder
- Type: SystemInt32

The number of derivatives to return. To return just the dependent variable values, pass 0 for this parameter. To return the first derivatives along with the dependent variable values, pass 1. To retrieve the second derivatives as well, pass 2. Note that not all interpolation algorithms are capable of returning second derivative information, and if a higher outputOrder is requested than the algorithm is able to provide, the highest order derivative will be returned and the request for the higher order derivatives is ignored. - startIndex
- Type: SystemInt32

The index in xTable of the first value to use in the interpolation. The index of the first value in yTable to use is calculated as: startIndex * yStride * (inputOrder + 1) - length
- Type: SystemInt32

The number of values to use in the interpolation. This value should be one more than the desired interpolation degree. For example for 7th degree interpolation, this parameter should be 8.

An array of interpolated values. The array contains at least yStride elements, each of which is an interpolated dependent variable value. If outputOrder is greater than zero, the array contains an additional number of yStride elements, for each output order.

Exceptions

Exception | Condition |
---|---|

ArgumentNullException | Thrown when xTable or yTable is . |

Remarks

The xTable array should contain one more than the desired interpolation degree.
For example, for a 7th degree interpolation, xTable should contain 8 elements.
The yTable array should contain a number of elements equal to:
xTable.Length.Length * yStride * (inputOrder + 1)

See Also