Communications Toolbox    
gfprimfd

Find primitive polynomials for a Galois field

Syntax

Description

pol = gfprimfd(m,opt,p) searches for one or more primitive polynomials for GF(p^m), where p is a prime number and m is a positive integer. If m = 1, then pol = [1 1]. If > 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.

opt
Significance of pol
Format of pol
'min'
One primitive polynomial for GF(p^m) having the smallest possible number of nonzero terms
The row vector representing the polynomial
'max'
One primitive polynomial for GF(p^m) having the greatest possible number of nonzero terms
The row vector representing the polynomial
'all'
All primitive polynomials for GF(p^m)
A matrix, each row of which represents one such polynomial
A positive integer
All primitive polynomials for GF(p^m) that have opt nonzero terms
A matrix, each row of which represents one such polynomial

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).

The output is below.

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