chebnodegen {capn} | R Documentation |
Unidimensional Chebyshev nodes
Description
The function generates uni-dimensional chebyshev nodes.
Usage
chebnodegen(n, a, b)
Arguments
n |
A number of nodes |
a |
The lower bound of inverval [a,b] |
b |
The upper bound of interval [a,b] |
Details
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).
Value
An array n Chebyshev nodes
References
Miranda, Mario J. and Paul L. Fackler. (2002) Applied Computational Economics and Finance. Cambridge: The MIT Press.
Examples
## 10 Chebyshev nodes in [-1,1]
chebnodegen(10,-1,1)
## 5 Chebyshev nodes in [1,5]
chebnodegen(5,1,5)
[Package capn version 1.0.0 Index]