Galois Field Array to Exponential Array Conversion

Convert GF array into exponential notation (a^3, etc)
340 Downloads
Updated 12 Feb 2012

View License

This code converts a Galois Field array created using GF(2^m) for a given primitive polynomial into the 'exponential' notation, which you can use with gfrepcov() to binary if you wish.

Uses the gf2dec() function internally.

Example usage:
>> genpoly = rsgenpoly(15,11)
genpoly = GF(2^4) array. Primitive polynomial = D^4+D+1 (19 decimal)

Array elements =
1 13 12 8 7

>> gf2exp(genpoly, 4, primpoly(4))
ans =
0 13 6 3 10

Showing this RS Polynomial is of form: X^4 + A^13*X^3 + A^6*X^2 + A^3*X + A^10, which is how you see it displayed in text books etc.

Cite As

Colin O'Flynn (2026). Galois Field Array to Exponential Array Conversion (https://www.mathworks.com/matlabcentral/fileexchange/34140-galois-field-array-to-exponential-array-conversion), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.1.0.0

Added note you need to download gf2dec seperately

1.0.0.0