<< gf_add Element arithmetic gf_divide >>

Galois Fields >> Galois Fields > Element arithmetic > gf_are_equal

gf_are_equal

Tests whether two arrays have the same size and entries

Syntax

tf = gf_are_equal(a, b)

Arguments

a, b

Real matrices: elements or polynomials.

tf

T if a and b have the same size and the same entries, F otherwise.

Description

gf_are_equal(a, b) compares two elements or polynomials. Unlike and(a == b), it returns F instead of raising an error when the sizes differ. Polynomials with trailing zero coefficients are not trimmed first, so [1 0] and [1 0 0] are different.

Examples

F = gf_create_field(2, 4);
gf_are_equal(gf_power(F, [0 1 0 0], 15), [1 0 0 0])   // T
gf_are_equal([1 0], [1 0 0])                          // F

See also

History

VersionDescription
2.0.0

Refactoring of the function/toolbox.


Report an issue
<< gf_add Element arithmetic gf_divide >>