Communications Toolbox    

Manipulating Galois Variables

This section describes techniques for manipulating Galois variables or for transferring information between Galois arrays and ordinary MATLAB arrays.

Determining Whether a Variable Is a Galois Array

To find out whether a variable is a Galois array rather than an ordinary MATLAB array, use the isa function. An illustration is below.

Extracting Information From a Galois Array

To extract the array elements, field order, or primitive polynomial from a variable that is a Galois array, append a suffix to the name of the variable. The table below lists the exact suffixes, which are independent of the name of the variable.

Information
Suffix
Output Value
Array elements
.x
MATLAB array of type uint16 that contains the data values from the Galois array
Field order
.m
Integer of type double that indicates that the Galois array is in GF(2^m)
Primitive polynomial
.prim_poly
Integer of type uint32 that represents the primitive polynomial. The representation is similar to the description in How Integers Correspond to Galois Field Elements.

The code below illustrates the use of these suffixes. The definition of empr uses a vector of binary coefficients of a polynomial to create a Galois array in an extension field. Another part of the example retrieves the primitive polynomial for the field and converts it to a binary vector representation having the appropriate number of bits.


  Polynomials over Galois Fields Speed and Nondefault Primitive Polynomials