| Communications Toolbox | ![]() |
To find the roots of a polynomial in a Galois field, use the roots function on a Galois vector that represents the polynomial. This function finds roots that are in the same field that the Galois vector is in. The number of times an entry appears in the output vector from roots is exactly its multiplicity as a root of the polynomial.
Note If the Galois vector is in GF(2m), then the polynomial it represents might have additional roots in some extension field GF((2m)k). However, roots does not find those additional roots or indicate their existence. |
The examples below find roots of cubic polynomials in GF(8).
m = 3; cubicpoly1 = gf([2 7 3 0],m); % A polynomial divisible by x cubicpoly2 = gf([2 7 3 1],m); cubicpoly3 = gf([2 7 3 2],m); zeroandothers = roots(cubicpoly1); % Zero is among the roots. multipleroots = roots(cubicpoly2); % One root has multiplicity 2. oneroot = roots(cubicpoly3); % Only one root is in GF(2^m).
| Evaluating Polynomials | Roots of Binary Polynomials | ![]() |
© 1994-2005 The MathWorks, Inc.