linterp(vx, vy, x) Returns a linearly
interpolated value at x for data vectors vx
and vy.
Arguments:
- vx is a vector of
real data values in ascending order.
- vy is a vector of
real data values having the same number of elements as vx.
- x is the value of the independent
variable at which to interpolate a result. For best results, this should
be in the range encompassed by the values of vx.
Notes:
- Since interpolation functions must pass through all
data points, they are very sensitive to spurious data. If your data is
noisy, consider using a regression function
instead.
- For x values outside of the
data range, linterp extrapolates a straight line between the first
or last two points.