| Communications Toolbox | ![]() |
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):
Navigate in MATLAB to a directory to which you have write permission. You can use either the cd function or the Current Directory feature to navigate.
Define m and prim_poly as workspace variables. For example:
m = 3; prim_poly = 13; % Examples of valid values
Invoke the gftable function:
gftable(m,prim_poly); % If you previously defined m and prim_poly
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.
| Extracting Information from a Galois Array | Selected Bibliography for Galois Fields | ![]() |
© 1994-2005 The MathWorks, Inc.