Communications Toolbox | ![]() ![]() |
Speed and Nondefault Primitive Polynomials
The section Specifying the Primitive Polynomial described how you can represent elements of a Galois field with respect to a primitive polynomial of your choice. This section describes how you can increase the speed of computations involving a Galois array that uses a primitive polynomial other than the default primitive polynomial. The technique is recommended if you perform many such computations.
The mechanism for increasing the speed is a data file, userGftable.mat
, that some computational functions use to avoid performing certain computations repeatedly. To take advantage of this mechanism for your combination of field order (m
) and primitive polynomial (prim_poly
):
cd
function or the Current Directory feature to navigate.
m
and prim_poly
as workspace variables. For example:
gftable
function:
The function revises or creates userGftable.mat
in your current working directory to include data relating to your combination of field order and primitive polynomial. After you initially invest the time to invoke gftable
, subsequent computations using those values of m
and prim_poly
should be faster.
Note
If you change your current working directory after invoking gftable , then you must place userGftable.mat on your MATLAB path to ensure that MATLAB can see it. Do this by using the addpath command to prefix the directory containing userGftable.mat to your MATLAB path. If you have multiple copies of userGftable.mat on your path, then use which('userGftable.mat','-all') to find out where they are and which one MATLAB is using.
|
To see how much gftable
improves the speed of your computations, you can surround your computations with the tic
and toc
functions. See the gftable
reference page for an example.
![]() | Manipulating Galois Variables | Selected Bibliography for Galois Fields | ![]() |