Communications Toolbox    
log

Logarithm in a Galois field

Syntax

Description

y = log(x) computes the logarithm of each element in the Galois array x. That is, y is an integer array that solves the equation A.^y = x, where A is the primitive element used to represent elements in x. More explicitly, the base A of the logarithm is gf(2,x.m) or gf(2,x.m,x.prim_poly). All elements in x must be nonzero because the logarithm of zero is undefined.

Examples

The code below illustrates how the logarithm operation inverts exponentiation.

The code below shows that the logarithm of 1 is 0 and that the logarithm of the base (primel) is 1.


  lloyds marcumq