Type representing polynomial expressions

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.


testtype(obj, Type::PolyExpr(unknowns, <coeff_type>))


With Type::PolyExpr, polynomial expressions can be identified.

The call testtype(obj, Type::PolyExpr(unknowns)) checks, whether obj is a polynomial expression in the indeterminates unknowns and, if so, returns TRUE, otherwise FALSE.

A polynomial expression in indet is an expression, where indet occurs only as operand of _plus or _mult expressions and in the base of _power with a positive integer exponent.

A polynomial expression is a representation of a polynomial, but it has the MuPAD® type DOM_EXPR and is not produced by the function poly.

indets must be an identifier or a list of identifiers.

The optional argument coeff_type determines the type of the coefficients. If it is not given, Type::AnyType will be used.

This type does not represent a property.


Example 1

Is the object a polynomial expression with variable x?

X := -x^2 - x + 3:
testtype(X, Type::PolyExpr(x))

But X is not a MuPAD polynomial in x:

testtype(X, Type::PolyOf(x))

Is the object a polynomial expression with variables x and y and with integer coefficients?

X := -x^2 - x + 3:
testtype(X, Type::PolyExpr([x, y], Type::Integer))

The next example too?

X := -x^2 - y^2 + 3*x + 3*y - 1:
testtype(X, Type::PolyExpr([x, y], Type::Integer))

delete X:



Any MuPAD object


An indeterminate or a list of indeterminates


The type of the coefficients; a type can be an object of the library Type or one of the possible return values of domtype and type

Return Values

See testtype

See Also

MuPAD Functions

Was this topic helpful?