Communications Toolbox    
gfroots

Find the roots of a polynomial over a prime Galois field

Syntax

Description

For all syntaxes, f is a row vector that gives the coefficients, in order of ascending powers, of a degree-d polynomial.

rt = gfroots(f,m,p) finds roots in GF(p^m) of the polynomial that f represents. m is an integer greater than or equal to d. rt is a column vector each of whose entries is the exponential format of a root. The exponential format is relative to a root of the default primitive polynomial for GF(p^m).

rt = gfroots(f,prim_poly,p) finds roots in GF(pm) of the polynomial that f represents. rt is a column vector each of whose entries is the exponential format of a root. The exponential format is relative to a root of the degree-m primitive polynomial for GF(pm) that prim_poly represents. m is an integer greater than or equal to d.

[rt,rt_tuple] = gfroots(...) returns an additional matrix rt_tuple, whose kth row is the polynomial format of the root rt(k). The polynomial and exponential formats are both relative to the same primitive element.

[rt,rt_tuple,field] = gfroots(...) returns additional matrices rt_tuple and field. rt_tuple is described in the paragraph above. field gives the list of elements of the extension field. The list of elements, the polynomial format, and the exponential format are all relative to the same primitive element.

Examples

Roots of Polynomials contains a description and example of the use of gfroots.

As another example, the code below finds the polynomial format of the roots of the primitive polynomial 2 + x3 + x4 for GF(81). It then displays the roots in traditional form as polynomials in alpha. (The output is omitted here.) Because prim_poly is both the primitive polynomial and the polynomial whose roots are sought, alpha itself is a root.

See Also
gfprimdf


  gfrepcov gfsub