Polynomial in traditional format
a polynomial in a traditional format, using
the variable and the entries of the row vector
the coefficients in order of ascending powers. The polynomial is displayed
in order of ascending powers. Terms having a zero coefficient are
gfpretty(a,st) is the
same as the first syntax listed, except that the content of the string
used as the variable instead of
the same as the first syntax listed, except that the content of the
st is used as the variable instead of
and each line of the display has width
of the default value of 79.
Note: For all syntaxes: If you do not use a fixed-width font, the spacing in the display might not look correct.
Display statements about the elements of GF(81).
p = 3; m = 4; ii = randi([1,p^m-2],1,1); % Random exponent for prim element primpolys = gfprimfd(m,'all',p); [rows, cols] = size(primpolys); jj = randi([1,rows],1,1); % Random primitive polynomial disp('If A is a root of the primitive polynomial') gfpretty(primpolys(jj,:)) % Polynomial in X disp('then the element') gfpretty([zeros(1,ii),1],'A') % The polynomial A^ii disp('can also be expressed as') gfpretty(gftuple(ii,m,p),'A') % Polynomial in A
Below is a sample of the output.
If A is a root of the primitive polynomial 3 4 2 + 2 X + X then the element 22 A can also be expressed as 2 3 2 + A + A