Communications Toolbox    

Roots of Polynomials

Given a polynomial over GF(p), the gfroots function finds the roots of the polynomial in a suitable extension field GF(pm). There are two ways to tell MATLAB the degree m of the extension field GF(pm), as shown in the table below.

Formats for Second Argument of gfroots 
Second Argument
Represents
A positive integer
m as in GF(pm). MATLAB uses the default primitive polynomial in its computations.
A row vector
A primitive polynomial for GF(pm). Here m is the degree of this primitive polynomial.

Example: Roots of a Polynomial in GF(9)

The code below finds roots of the polynomial 1 + x2 + x3 in GF(9) and then checks that they are indeed roots. The exponential format of elements of GF(9) is used throughout.

The output shows that A0 (which equals 1), A5, and A7 are roots.

See the reference page for gfroots to see how gfroots can also provide you with the polynomial formats of the roots and the list of all elements of the field.


  Characterization of Polynomials Other Galois Field Functions