Communications Toolbox | ![]() ![]() |
Find primitive polynomials for a Galois field
Syntax
Description
pr = primpoly(m)
returns the primitive polynomial for GF(2^m
), where m
is an integer between 2
and 16
. The Command Window displays the polynomial using "D
" as an indeterminate quantity. The output argument pr
is an integer whose binary representation indicates the coefficients of the polynomial.
pr = primpoly(m,
returns one or more primitive polynomials for GF(opt
)
2^m
). The output pol
depends on the argument opt
as shown in the table below. Each element of the output argument pr
is an integer, whose binary representation indicates the coefficients of the corresponding polynomial. If no primitive polynomial satisfies the constraints, then pr
is empty.
pr = primpoly(m...,'nodisplay')
prevents the function from displaying the result as polynomials in "D
" in the Command Window. The output argument pr
is unaffected by the 'nodisplay'
option.
Examples
The example below illustrates the formats that primpoly
uses in the Command Window and in the output argument pr
.
The examples below illustrate the display options and the use of the opt
argument.
pr1 = primpoly(5,'max','nodisplay') pr1 = 61 pr2 = primpoly(5,'min') Primitive polynomial(s) = D^5+D^2+1 pr2 = 37 pr3 = primpoly(5,2) No primitive polynomial satisfies the given constraints. pr3 = [] pr4 = primpoly(5,3); Primitive polynomial(s) = D^5+D^2+1 D^5+D^3+1
See Also
![]() | poly2trellis | qaskdeco | ![]() |