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):

  1. 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.
  2. Define m and prim_poly as workspace variables. For example:
  3. Invoke the 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.

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