MATLAB: Is ‘p’ a positive prime or just odd in the GFPRIMDF(m,p) documentation of Signal Processing Toolbox 6.4(R14SP3)

communications blocksetgfprimdf

The following note in the documentation for GFPRIMDF function, confuses me:
Note: This function performs computations in GF(p^m) where p is odd. To work in GF(2^m), use the primpoly function.
The help on GFPRIMFDF also shows the same.
As a sample case, I tried generating an irreducible primitive polynomial for GF(2^3) and it works:
pol=gfprimdf(3,2)
The output is:
pol = 1 1 0 1
pol=gfprimdf(3,9)
This generates the following error:
??? Error using ==> gfprimdf
P must be a real prime integer greater than one.
In gfprimdf.m , line 30 has a call to ~isprime(p)
From what I understand from the theory on Galois Fields, for any prime p and any positive integer m, GF(p^m) exists, and it is always possible to find a primitive irreducible polynomial of degree m over GF(p).

Best Answer

There is a bug in the documentation for the GFPRIMDF function. The documentation should state the following:
Note: This function performs computations in GF(p^m) where p is a real prime integer greater than one.
Related Question