chebnodegen {capn} | R Documentation |
The function generates uni-dimensional chebyshev nodes.
chebnodegen(n, a, b)
n |
A number of nodes |
a |
The lower bound of inverval [a,b] |
b |
The upper bound of interval [a,b] |
A polynomial approximant s_{i}
over a bounded interval [a,b] is constructed by:
s_{i} = \frac{b+a}{2} + \frac{b-a}{2}cos (\frac{n - i + 0.5 }{n} \pi )
for i = 1,2,\cdots,n
.
More detail explanation can be refered from Miranda and Fackler (2002, p.119).
An array n Chebyshev nodes
Miranda, Mario J. and Paul L. Fackler. (2002) Applied Computational Economics and Finance. Cambridge: The MIT Press.
## 10 Chebyshev nodes in [-1,1]
chebnodegen(10,-1,1)
## 5 Chebyshev nodes in [1,5]
chebnodegen(5,1,5)