File Exchange

image thumbnail

MatthewPeterKelly/C​hebyshev_Polynomial​s

version 1.0.0.0 (32.6 KB) by Matthew Kelly
Tutorial for working with Chebyshev Orthogonal Polynomials

1 Download

Updated 16 Feb 2017

From GitHub

View license on GitHub

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.

Cite As

Matthew Kelly (2021). MatthewPeterKelly/Chebyshev_Polynomials (https://github.com/MatthewPeterKelly/Chebyshev_Polynomials), GitHub. Retrieved .

Comments and Ratings (2)

Matthew Kelly

There is no way that I know of to compute the min or max of an arbitrary high-order polynomial in closed form. There are trivial solutions for linear and quadratic, and nasty ones for cubic and probably quartic polynomials.

How to compute the min and max value then? There are fast and robust numerical methods that are specialized for computing the roots of polynomials. The steps are as follows:
1) Take the derivative of your target polynomial (a trivial linear operation on the coefficients)
2) Bracket the zero-crossings of the polynomial (I think that should be easier with orthogonal basis)
3) Use a bounded nonlinear root-finding method for computing the roots numerically. These can be implemented very efficiently for polynomials.

For step 3, see section 9.5 in Numerical Recipes in C (second edition).

Yu Zhao

Is there any way to detect maximum or minimum point on the approximated function given order and knots?

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!