Polynomials

Curve fitting, roots, partial fraction expansions

Polynomials are equations of a single variable with nonnegative integer exponents. MATLAB® represents polynomials with numeric vectors containing the polynomial coefficients ordered by descending power. For example, [1 -4 4] corresponds to x2 - 4x + 4. For more information, see Create and Evaluate Polynomials.

Functions

polyPolynomial with specified roots or characteristic polynomial
polyeigPolynomial eigenvalue problem
polyfitPolynomial curve fitting
residuePartial fraction expansion (partial fraction decomposition)
rootsPolynomial roots
polyvalPolynomial evaluation
polyvalmMatrix polynomial evaluation
convConvolution and polynomial multiplication
deconvDeconvolution and polynomial division
polyintPolynomial integration
polyderPolynomial differentiation

Topics

Create and Evaluate Polynomials

This example shows how to represent a polynomial as a vector in MATLAB® and evaluate the polynomial at points of interest.

Roots of Polynomials

Calculate polynomial roots numerically, graphically, or symbolically.

Integrate and Differentiate Polynomials

This example shows how to use the polyint and polyder functions to analytically integrate or differentiate any polynomial represented by a vector of coefficients.

Polynomial Curve Fitting

This example shows how to fit a polynomial curve to a set of data points using the polyfit function.

Programmatic Fitting

There are many functions in MATLAB that are useful for data fitting.

Featured Examples