Utility

This module provides the utility subroutines for other DLR modules.

Lehmann.Interp.barychebMethod

function barycheb(n, x, f, wc, xc)

Barycentric Lagrange interpolation at Chebyshev nodes Reference: Berrut, J.P. and Trefethen, L.N., 2004. Barycentric lagrange interpolation. SIAM review, 46(3), pp.501-517.

Arguments

  • n: order of the Chebyshev interpolation
  • x: coordinate to interpolate
  • f: array of size n, function at the Chebyshev nodes
  • wc: array of size n, Barycentric Lagrange interpolation weights
  • xc: array of size n, coordinates of Chebyshev nodes

Returns

  • Interpolation result
source
Lehmann.Interp.barychebinitMethod

barychebinit(n)

Get Chebyshev nodes of first kind and corresponding barycentric Lagrange interpolation weights. Reference: Berrut, J.P. and Trefethen, L.N., 2004. Barycentric lagrange interpolation. SIAM review, 46(3), pp.501-517.

Arguments

  • n: order of the Chebyshev interpolation

Returns

  • Chebyshev nodes
  • Barycentric Lagrange interpolation weights
source