Skip to content

poly_interpol

Fabian Kindermann edited this page Apr 2, 2021 · 10 revisions
function poly_interpol(x, xi, yi)

Description:

Interpolates the (arbitrary) data pairs by a polynomial of degree , so that

with suitable coefficients . The function evaluates the interpolating polynomial at the supplied value(s) .

Input arguments:

  • real*8 :: x    or    real*8 :: x(:)
    The point(s) where to evaluate the interpolating polynomial. This can be either a scalar or a one-dimensional array of arbitrary size. In the latter case, the polynomial is evaluated at each point supplied in the array x.
  • real*8 :: xi(:)
    A one-dimensional array containing the nodes at which the interpolation data is supplied.
  • real*8 :: yi(:)
    A one-dimensional array containing the interpolation data at the nodes xi. This input variable needs to have the same length as xi.

Return Value:

  • real*8 :: poly_interpol    or    real*8 :: poly_interpol(:)
    The value of the interpolating polynomial at the point(s) supplied in x. This is a scalar if x is a scalar and a one-dimensional array if x is an array.

References

  • For further reading refer to:
    • Süli, E. & Mayers, D. F. (2003). An Introduction to Numerical Analysis. Cambridge: Cambridge University Press.
    • Powell, M.J.D. (1996). Approximation Theory and Methods. Cambridge: Cambridge University Press.
  • This routine is used in the following programs:
    • prog02_17.f90
Clone this wiki locally