| Communications Toolbox | ![]() |
The same function gftuple also produces the simplest exponential representation of an element of GF(pm), given either an exponential representation or a polynomial representation of that element. To retrieve this output, use the syntax
[polyformat, expformat] = gftuple(...)
The input format and the output polyformat are as in the table Behavior of gftuple Depending on Format of First Two Inputs . In addition, the variable expformat contains the simplest exponential format of the element represented in polyformat. It is simplest in the sense that the exponent is either -Inf or a number between 0 and pm-2.
To recover the exponential format of the element 2 + A that the previous section considered, use the commands below. In this case, polyformat contains redundant information, while expformat contains the desired result.
[polyformat, expformat] = gftuple([2 1],2,3)
polyformat =
2 1
expformat =
6
This output appears at first to contradict the information in the table Elements of GF(9) , but in fact it does not. The table uses a different primitive element; two plus that primitive element has the polynomial and exponential formats shown below.
prim_poly = [2 2 1]; [polyformat2, expformat2] = gftuple([2 1],prim_poly,3)
The output below reflects the information in the bottom line of the table.
polyformat2 =
2 1
expformat2 =
7
| Example: Generating a List of Galois Field Elements | Arithmetic in Galois Fields | ![]() |
© 1994-2005 The MathWorks, Inc.