powered by
Generate unidimensional Chebyshev nodes over a bounded interval.
chebnodegen(n, a, b)
A numeric vector of length \(n\) containing Chebyshev nodes.
An integer specifying the number of nodes.
The lower bound of the interval \([a, b]\).
The upper bound of the interval \([a, b]\).
A polynomial approximant \(s_{i}\) over a bounded interval \([a, b]\) is constructed using Chebyshev nodes as: \( s_{i} = \frac{b + a}{2} + \frac{b - a}{2} \cos \left( \frac{n - i + 0.5}{n} \pi \right) \) for \(i = 1, 2, \ldots, n\). Further details can be found in Miranda and Fackler (2002, p.~119).
Miranda, Mario J. and Paul L. Fackler (2002). Applied Computational Economics and Finance. Cambridge: MIT Press.
## 10 Chebyshev nodes in [-1, 1] chebnodegen(10, -1, 1) ## 5 Chebyshev nodes in [1, 5] chebnodegen(5, 1, 5)
Run the code above in your browser using DataLab