Documentation

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.

polylib::divisors

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.

Syntax

polylib::divisors(p)
polylib::divisors(f)
polylib::divisors(e)

Description

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.

Examples

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));
polylib::divisors(p)

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

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

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))

Parameters

p

A polynomial or polynomial expression

f

Factored (return value of factor)

e

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?