Communications Toolbox    
gfplus

Add elements of a Galois field of characteristic two

Syntax

Description

k = gfplus(a,b,fvec,ivec) adds a and b in GF(2m), using the exponential format to represent inputs and outputs. If a and b are matrices, then they must have the same dimensions, and gfplus adds them element-by-element. See Representing Elements of Galois Fields for an explanation of the exponential format.

fvec and ivec are vectors of length 2m. The entries in both are integers between 0 and 2m-1. fvec contains the same information as the field parameter as used by gfadd, except that fvec has been condensed into a vector. To compute fvec and ivec, define m and then use the commands below.

Alternatively, define a primitive polynomial vector pol and then use the commands below. See gfprimfd for information about defining pol.

Examples

This example adds two matrices, each of which contains random nonzero elements of GF(25).

See Also
gfadd, gfsub


 gfmul gfpretty