Standard Library function that performs a linearinterpolation of a vector using either a regular or irregular grid.
n The number of interpolated points.
x The independent values of the vector that is to be interpolated. Must have the same number of values as v, and must be monotonic, either increasing or decreasing.
u The independent values at which interpolation is to occur. Is not necessarily monotonic.
where
j = i(m-1)/(n-1)
i is in the range 0 i (n-1)
m is the number of points in the input vector v.
The output grid horizontal coordinates (abscissae values) are calculated in the following way, using the FLOAT function:
abscissa_value(i) = FLOAT(i) / m
where i is in the range 0 i (n - 1).
where j = u(i).
To get these additional samples, enter the following command:
out_vector = INTERPOL(in_vector, 15)
in_vector
has a value of [0, 5, 10, 5, 0] andout_vector
yields the following values:
[0, 1.42857, 2.85714, 4.28571, 5.71429, 7.14286, 8.57143, 10.0000, 8.57143, 7.14286, 5.71429, 4.28571, 2.85714, 1.42857, 0]