Description
Note
This function performs computations in GF(p
m
),
where p is prime. To work in GF(2
m
), apply
the
./
operator to Galois arrays. For details,
see
Example: Division
.
The
gfdiv
function divides elements of a
Galois field. (To divide polynomials over a Galois field, use
gfdeconv
instead.)
quot = gfdiv(b,a)
divides
b
by
a
in
GF(2) element-by-element.
a
and
b
are
scalars, vectors or matrices of the same size. Each entry in
a
and
b
represents
an element of GF(2). The entries of
a
and
b
are
either 0 or 1.
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, 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(p
m
) 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(p
m
)
relative to some primitive element of GF(p
m
).
field
is
the matrix listing all elements of GF(p
m
),
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
.
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.