cheb: Chebyshev polynomials

View source: R/cheb.R

chebR Documentation

Chebyshev polynomials

Description

Return the value of the Chebyshev polynomial at specific points.

Usage

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

Details

The Chebyshev polynomials are defined by the equations:

  Tn(x) = cos(n . acos(x),    |x|<= 1
  Tn(x) = cosh(n . acosh(x),  |x|> 1

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)).

Value

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

Author(s)

André Carezia, acarezia@uol.com.br.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.

Examples


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


gjmvanboxtel/gsignal documentation built on Nov. 22, 2023, 8:19 p.m.