cheb function

Chebyshev polynomials

Chebyshev polynomials

Return the value of the Chebyshev polynomial at specific points.

cheb(n, x)

Arguments

  • n: Order of the polynomial, specified as a positive integer.
  • x: Point or points at which to calculate the Chebyshev polynomial

Returns

Polynomial of order x, evaluated at point(s) x.

Details

The Chebyshev polynomials are defined by the equations:

If x is a vector, the output is a vector of the same size, where each element is calculated as y(i)=Tn(x(i))y(i) = Tn(x(i)).

Examples

cp <- cheb(5, 1) cp <- cheb(5, c(2,3))

Author(s)

André Carezia, acarezia@uol.com.br .

Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com .

  • Maintainer: Geert van Boxtel
  • License: GPL-3
  • Last published: 2024-09-11