Main Content

gfcosets

Produce cyclotomic cosets for Galois field

Description

c = gfcosets(m) produces cyclotomic cosets mod(2m - 1). Each row of the output GFCS contains one cyclotomic coset.

Note

This function performs computations in GF(pm), where p is prime. To work in GF(2m), use the cosets function.

example

c = gfcosets(m,p) produces the cyclotomic cosets for GF(p^m), where m is a positive integer and p is a prime number.

Examples

collapse all

Find the cyclotomic cosets for GF(9).

c = gfcosets(2,3)
c = 5×2

     0   NaN
     1     3
     2     6
     4   NaN
     5     7

Input Arguments

collapse all

Order of primitive polynomial, specified as a positive integer from 1 through 16. The function uses this value to calculate the distinct number of elements in the GF.

Data Types: double

Prime number, specified as a positive integer. The function uses this value to calculate the distinct number of elements in the GF.

Data Types: double

Output Arguments

collapse all

Cyclotomic cosets, returned as a matrix. The function uses this value to calculate the distinct number of elements in the GF. A cyclotomic coset is a set of elements that all satisfy the same minimal polynomial. For more details on cyclotomic cosets, see the works listed in References.

Each row in the matrix represents one coset. The row represents the coset in an exponential format of the elements of the coset, relative to the default primitive polynomial for the field. For a description of exponential formats, see Representing Elements of Galois Fields.

The first column contains the coset leaders. The lengths of cosets might vary and entries of NaN are used to fill the extra spaces when necessary to make c rectangular.

Data Types: double

References

[1] Blahut, Richard E., Theory and Practice of Error Control Codes, Reading, MA, Addison-Wesley, 1983, p. 105.

[2] Lin, Shu, and Daniel J. Costello, Jr., Error Control Coding: Fundamentals and Applications, Englewood Cliffs, NJ, Prentice-Hall, 1983.

Version History

Introduced before R2006a