Class mpoly (multivariate polynomial)

Multivariate polynomial class with automatic differentiation functionality

You are now following this Submission

Class mpoly represents a numeric array (of any nonempty size, any number of dimensions) as a polynomial function (any degree) of a set of independent parameters (any number of parameters), or as a truncated polynomial approximation (Taylor series). The class encapsulates the function value and its series coefficients.
Most standard array operations (+, -, *, /, cat, transpose, etc.) are implemented in mpoly to automatically calculate series coefficients for the result, effectively implementing automatic differentiation. Multivariate operations can be applied to mixed mpoly and numeric arguments, with numeric values being interpreted as constants.
mpoly is adapted to work with single- or double-precision data, and with GPU arrays.

Cite As

Kenneth Johnson (2026). Class mpoly (multivariate polynomial) (https://nl.mathworks.com/matlabcentral/fileexchange/182185-class-mpoly-multivariate-polynomial), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: Class DAA, "Derivative-Augmented Array"

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.2.0

Efficiency improvements in mpoly.mldivide and mpoly.pagemldivide. Added rcond output to mpoly.pagemldivide and mpoly.pageinv. Revised test_mpoly.m.

1.1.6

Replace sqrt(x) with sqrt(complex(x)) when isgpuarray(x) && isreal(x) && any(X(:)<0).

1.1.5

Don't use decomposition on gpuArray data.

1.1.3

Made gpuArray and inferior class: classdef (InferiorClasses = {?gpuArray}) ...

1.1.2

Corrected upload files from last version.

1.1.1

Added global asgn function, modified test_mpoly.

1.1.0

code revisions
new files: besselj.m, test_besselj.m, mpoly_tutorial.mlx
Included link to algorithm document reference in mpoly.m.

1.0.0