Communications Toolbox    
gfdiv

Divide elements of a Galois field

Syntax

Description

The gfdiv function divides elements of a Galois field. (To divide polynomials over a Galois field, use gfdeconv instead.)

quot = gfdiv(b,a,p) divides b by a in GF(p) and returns the quotient. p is a prime number. If a and b are matrices of the same size, then the function treats each element independently. All entries of b, a, and quot are between 0 and p-1.

quot = gfdiv(b,a,field) divides b by a in GF(pm) and returns the quotient. p is a prime number and m is a positive integer. If a and b are matrices of the same size, then the function treats each element independently. All entries of b, a, and quot are the exponential formats of elements of GF(pm) relative to some primitive element of GF(pm). field is the matrix listing all elements of GF(pm), arranged relative to the same primitive element. See Representing Elements of Galois Fields for an explanation of these formats.

In all cases, an attempt to divide by the zero element of the field results in a "quotient" of NaN.

Examples

The code below displays lists of multiplicative inverses in GF(5) and GF(25). It uses column vectors as inputs to gfdiv.

See Also
gfmul, gfdeconv, gfconv, gftuple


  gfdeconv gffilter