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.


Divisors of a polynomial, polynomial expression, or Factored element

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.




polylib::divisors(p) computes the set of all monic divisors of the polynomial or polynomial expression p.

polylib::divisors(f) returns all monic divisors of a pre-factored polynomial. Cf. Example 3.

polylib::divisors works on polynomials of category Cat::Polynomial as well. Cf. Example 4.


Example 1

If the argument is a polynomial, a set of polynomials is returned:

polylib::divisors(poly(x^2 - 2*x + 1))

Example 2

If the argument is a polynomial expression, a set of polynomial expressions is returned:

polylib::divisors(x^2 - 1)

Example 3

If the argument is of type Factored (a factor return value) a set of polynomials is returned:

p := factor(poly(x^2 - 1));

The polynomials in the resulting set have the same type as the polynomials in the Factored element:

p := factor(x^2 - 1);

Example 4

polylib::divisors works on polynomials from category Cat::Polynomial as well:

P := Dom::Polynomial(Dom::IntegerMod(7)):
polylib::divisors(P(x^3 + 2*x^2 + 1))



A polynomial or polynomial expression


Factored (return value of factor)


Element of a domain of category Cat::Polynomial

Return Values

polylib::divisors returns a set of polynomials. The polynomials are from the same type as the polynomials in the argument.

Was this topic helpful?