Communications Toolbox | ![]() ![]() |
Find primitive polynomials for a Galois field
Syntax
Description
Note
This function performs computations in GF(pm) where p is odd. To work in GF(2m), use the primpoly function. For details, see Finding Primitive Polynomials.
|
m
= 1, then pol
= [1 1].
pol = gfprimfd(m,
searches for one or more primitive polynomials for GF(opt
,p)
p^m
), where p
is a prime number and m
is a positive integer. If m
= 1, then pol
= [1 1]. If m
> 1, then the output pol
depends on the argument opt
as shown in the table below. Each polynomial is represented in pol
as a row containing the coefficients in order of ascending powers.
Examples
The code below seeks primitive polynomials for GF(81) having various other properties. Notice that fourterms
is empty because no primitive polynomial for GF(81) has exactly four nonzero terms. Also notice that fewterms
represents a single polynomial having three terms, while threeterms
represents all of the three-term primitive polynomials for GF(81).
p = 3; m = 4; % Work in GF(81). fewterms = gfprimfd(m,'min',p) threeterms = gfprimfd(m,3,p) fourterms = gfprimfd(m,4,p)
fewterms = 2 1 0 0 1 threeterms = 2 1 0 0 1 2 2 0 0 1 2 0 0 1 1 2 0 0 2 1 No primitive polynomial satisfies the given constraints. fourterms = []
Algorithm
gfprimfd
tests for primitivity using gfprimck
. If opt
is '
min
'
, '
max
'
, or omitted, then polynomials are constructed by converting decimal integers to base p
. Based on the decimal ordering, gfprimfd
returns the first polynomial it finds that satisfies the appropriate conditions.
See Also
gfprimck
, gfprimdf
, gftuple
, gfminpol
![]() | gfprimdf | gfrank | ![]() |