Tutorial for function approximation with Chebyshev orthogonal polynomials, written in Matlab. Strongly inspired by the chebfun project (www.chebfun.org). These methods use barycentric interpolation, which allows for efficient computation and numerical stability, even for high-order approximations. Includes functions for function approximation, data fitting, integration, differentiation, and interpolation.
I use these approximations for solving ordinary differential equations and in the background of trajectory optimization problems.