Returns the value of the Lagrange interpolating polynomial of
a column vector valued function at a point.
The interpolating polynomial has degree that is one less than the
column dimension of xd and is equal to the
j-th column of yd at the j-th element of xd.
The row vector xd specifies the argument values that the
The real, double-precision, or complex matrix yd
specifies the function values that the polynomial interpolates.
The parameters yd and xd
must have the same number of columns.
The scalar xi specifies the point at which to evaluate
If yd is real or double-precision,
xd and xi must have the same type as yd.
If yd is complex, xd and xi must be
The return value will have the same type as yd.
xd = [-1., 0., 2.]
yd = [+1., 0., 4.]
xi = 3.
print lagrange(xd, yd, xi)