powered by
The function generates uni-dimensional chebyshev nodes.
chebnodegen(n, a, b)
A number of nodes
The lower bound of inverval [a,b]
The upper bound of interval [a,b]
An array n Chebyshev nodes
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).
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)
Run the code above in your browser using DataLab