Communications Toolbox | ![]() ![]() |
Check whether a polynomial over a Galois field is primitive
Syntax
ck = gfprimck(a); ck = gfprimck(a,p);
Description
ck = gfprimck(a)
returns a flag ck
that indicates whether a polynomial over GF(2) is irreducible or primitive. a
is a row vector that gives the coefficients of the polynomial in order of ascending powers. Each coefficient is either 0 or 1, since the field is GF(2). If m is the degree of the polynomial, then the output ck
is:
a
is not an irreducible polynomiala
is irreducible but not a primitive polynomial for GF(2m)a
is a primitive polynomial for GF(2m)This function considers the zero polynomial to be "not irreducible" and considers all polynomials of degree zero or one to be primitive.
ck = gfprimck(a,p)
is the same as the syntax listed above, except that 2 is replaced by a prime number p
.
Examples
The section Characterization of Polynomials contains examples.
Algorithm
An irreducible polynomial over GF(p) of degree at least 2 is primitive if and only if it does not divide -1 + xk for any positive integer k smaller than pm-1.
See Also
gfprimfd
, gfprimdf
, gftuple
, gfminpol
, gfadd
References
Clark, George C. Jr. and J. Bibb Cain. Error-Correction Coding for Digital Communications. New York: Plenum Press, 1981.
![]() | gfpretty | gfprimdf | ![]() |