File Exchange

image thumbnail

Polynomial Toolbox: polyBox Version 2.1

Polanomial approximation, polynomials as admissible functions, a comprehensive tutorial.



View License

polyBox: version V2.1

July 2013

This toolbox extends the capabilities of polynomials as implemented in MATLAB. The following functions are made available:

polyadd: polynomial addition with covariance propagation.

polymult: polynomial multiplication with covariance propagation polyfitcov: extends polyfit to return the covariance of the coefficients.

polytrans: transforms the shifted polynomials coefficients to unshifted coefficients.

polyvander: generates a vandermonde matrix exachtly as used in polyfit and polyval, including the shift and scaling if desired. This function is used in may of the other scripts to extend the capabilities of MATLAB with respect to polynomials.

polydiffcfs: Generate the matrix M which performs differentiation on the coefficients of a polynomial. This function is used internally to generate constrained polynomials.

polyconstrained: Generate a set of constrained polynomials, i.e., a set of polynomials which fulfil a set of generic constraints of the form D^(n) Y(a) = b. Such constraints are common in initial value and boundary value problems. Usable as admisssible functions in a discrete implementation of a Rayleigh-Ritz method.

polydifflocal: Generate a matrix D which performs local polynomial differentiation.

polyfitconstrained: This functions performs a least squares approximation of a set of data points x, y, while fulfilling predefined constraints. This type of problem occurs in many measurement problems (inverse problems), e.g., the measurement of the deflection of structures.

Origially, the toolbox started as a tutorial on the implementation of polynomials in MATLAB. The comprehensive tutorial, with derivation of all the equations behing the implemation, is still part of the toolbox. However, the number of functions added has grown to an extend that it has become a toolbox in its own right.

The library is organized as follows:

1) Tutorial: The directory containing the introductory tutorial on polynomials and their implementation in MATLAB
2) Advanced:
- ConstrainedApproximation: Examples of constrained fitting.
- ConstrainedPolynomials: Examples of constrained polynomials.

3) polybox: the source code for the toolbox.


Version 2.1

1) The theory, i.e. all derivations, reuired for the generation of constrained polynomials and for the computation of least squares constrained polynomial approximation have been added.

2) Some minor variable renaming has been performed in polyconstrained.m to make the code more consistent with the documentation. This has no effect on the functionality.

Comments and Ratings (1)




The theory behing the constrained polynomials and the least squares polynomial approximation has been added.


Constrained polynomials as admissible functions have been added, as has constrained approximation. This extends the use of the toolbox to inverse problems. Consequently, the toolbox has been rearranged so that it is now more than just a tutorial.


1) Many typing errors were corrected
2) Some minor modifications made to the function polyvander.m to make it more generally usable in initial value problems.
3) A new method of fitting homogeneously constrained polynomials has been added.


Homogeneously constrained polynomials have been added


The issue of numerical accuracy when computing the roots of polynomials which have multiple roots has been added. More information on QR decomposition of the Vandermonde matrix and the identification of the loss of significant digits has been added.

MATLAB Release
MATLAB 7.14 (R2012a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video