| Communications Toolbox | ![]() |
Provide default primitive polynomials for a Galois field
Syntax
pol = gfprimdf(m); pol = gfprimdf(m,p);
Description
pol = gfprimdf(m)
returns the row vector that gives the coefficients, in order of ascending powers, of MATLAB's default primitive polynomial for GF(2m). m is a positive integer.
pol = gfprimdf(m,p)
returns the row vector that gives the coefficients, in order of ascending powers, of MATLAB's default primitive polynomial for GF(pm). m is a positive integer and p is a prime number.
Examples
The command below shows that 2 + x + x2 is the default primitive polynomial for GF(52).
pol = gfprimdf(2,5)
pol =
2 1 1
The code below displays the default primitive polynomial for each of the fields GF(2m), where m ranges between 3 and 5.
for m = 3:5
gfpretty(gfprimdf(m))
end
3
1 + X + X
4
1 + X + X
2 5
1 + X + X
See Also
gfprimck, gfprimfd, gftuple, gfminpol
| gfprimck | gfprimfd | ![]() |