This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Type representing polynomials

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.


testtype(obj, Type::PolyOf(coeff_type, <num_ind>))


With Type::PolyOf, polynomials can be identified.

The call testtype(obj, Type::PolyOf(coeff_type)) checks, whether obj is a polynomial with coefficients of type coeff_type and, if so, returns TRUE, otherwise FALSE.


Only polynomials of type DOM_POLY can be identified with Type::PolyOf, see Type::PolyExpr for polynomial expressions.

coeff_type determines the type of the coefficients.

The optional argument num_ind determines the number of indeterminates. If this argument is not given, the polynomial may have any number of indeterminates.

This type does not represent a property.


Example 1

Is the object a polynomial with integer coefficients?

P := poly(-x^2 - x + 3):
testtype(P, Type::PolyOf(Type::Integer))

Is the object a polynomial with integer coefficients and two indets?

P := poly(-x^2 - x + 3, [x, y]):
testtype(P, Type::PolyOf(Type::Integer, 2))

delete P:



Any MuPAD® object


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


The number of indeterminates

Return Values

See testtype

See Also

MuPAD Functions

Was this topic helpful?