polynomial

Polynomial models

Polynomial models for curves are given by

\[y=\sum_{k=0}^np_kx^k\]

where \(n+1\) is the order of the polynomial and \(n\) is the degree of the polynomial. The order gives the number of coefficients to be fit, and the degree gives the highest power of the predictor variable.

Polynomials are often used when a simple empirical model is required. You can use the polynomial model for interpolation or extrapolation, or to characterize data using a global fit.

This module provides the general polynomial model above for any integer \(n\geq0\), as well as convenience functions for polynomial models with \(1\leq n \leq9\) analogous to MATLAB’s poly1, poly2, etc.

Note that in MATLAB, the polynomial models have the form

\[y=\sum_{i=1}^{n+1}p_ix^{n+1-i}\]

Functions

poly

General polynomial model.

poly1

Convenience function for the poly1 model from MATLAB:

poly2

Convenience function for the poly2 model from MATLAB:

poly3

Convenience function for the poly3 model from MATLAB:

poly4

Convenience function for the poly4 model from MATLAB:

poly5

Convenience function for the poly5 model from MATLAB:

poly6

Convenience function for the poly6 model from MATLAB:

poly7

Convenience function for the poly7 model from MATLAB:

poly8

Convenience function for the poly8 model from MATLAB:

poly9

Convenience function for the poly9 model from MATLAB: