Main Content

gfminpol

Find minimal polynomial of Galois field element

Description

pol = gfminpol(k,m) produces a minimal polynomial for each entry in k.

example

pol = gfminpol(k,m,p) finds the minimal polynomial of Ak over GF(p), where A is a root of the default primitive polynomial for GF(p^m). The format of the output is as follows:

  • If k is a nonnegative integer, pol is a row vector that gives the coefficients of the minimal polynomial in order of ascending powers.

  • If k is a vector of length len all of whose entries are nonnegative integers, pol is a matrix having len rows; the rth row of pol gives the coefficients of the minimal polynomial of Ak(r) in order of ascending powers.

pol = gfminpol(k,prim_poly,p) where A is a root of the primitive polynomial for GF(pm) specified by prim_poly.

Examples

collapse all

Consider GF element, GF(34).

p = 3;
m = 4;

Compute the minimum polynomial of α1, where α is the primitive element of GF(34).

k=1
k = 
1
prim_poly = gfminpol(k,m,p)
prim_poly = 1×5

     2     1     0     0     1

The numbers in the output are coefficients in GF(3).

Input Arguments

collapse all

Element of Galois field polynomial, specified as a scalar or a column vector.

Data Types: double

Order of primitive polynomial, specified as a positive integer from 1 through 16. The function uses this value to calculate the distinct number of elements in the GF.

Data Types: double

Prime number, specified as a scalar prime number.

Data Types: double

Primitive polynomial, specified as one of these options:

  • Binary row vector — This vector specifies coefficients of prim_poly in the order of ascending powers.

  • Character vector or a string scalar — This value defines prim_poly in a textual representation. For more details, refer to polynomial character vector.

  • Positive integer — This value defines prim_poly in the range [(2m + 1), (2m+1 – 1)].

If prim_poly is not specified, see Default Primitive Polynomials for the list of default primitive polynomial used for each Galois field array GF(2m).

Data Types: double | char | string

Output Arguments

collapse all

Minimal polynomial of Galois field element, returned as a row vector or matrix.

Version History

Introduced before R2006a