Syntax: |
vout = INTERPOLATE(x,y,xout,'LAGRANGE')
|
If the LAGRANGE
keyword is used, the
interpolating method used is general Lagrange interpolation. The degree of
the interpolating polynomial depends on the number of input data points.
Suppose that N
is the number of points, equal to the lengths of
x
and y
. If N = 2
,
then a simple straight line is used for interpolating. If N = 3
or N = 4
, then a quadratic is used. If N ≥ 5
,
then a polynomial of degree 4
is used for the interpolation.