Generate file to accelerate Galois field computations
a file that can help accelerate computations in the field GF(
as described by the nondefault primitive polynomial
which can be either a polynomial character vector or
prim_poly represents a primitive polynomial
2^m), where 1 < m <
16, using the format described in Specifying the Primitive Polynomial.
The function places the file, called
in your current working folder. If necessary, the function overwrites
any writable existing version of the file.
In the example below, you expect
t3 to be
t1 and to be significantly smaller than
assuming that you do not already have a
that includes the (
501). Notice that before
gftable command, MATLAB displays
a warning and that after executing
is no warning. By executing the
you save the GF table for faster calculations.
% Sample code to check how much gftable improves speed. tic; a = gf(repmat([0:2^8-1],1000,1),8); b = a.^100; t1 = toc; tic; a = gf(repmat([0:2^8-1],1000,1),8,501); b = a.^100; t2 = toc; gftable(8,501); % Include this primitive polynomial in the file. tic; a = gf(repmat([0:2^8-1],1000,1),8,501); b = a.^100; t3 = toc;