This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Minimize length of polynomial representation


c = gftrunc(a)


c = gftrunc(a) truncates a row vector, a, that gives the coefficients of a GF(p) polynomial in order of ascending powers. If a(k) = 0 whenever k > d + 1, the polynomial has degree d. The row vector c omits these high-order zeros and thus has length d + 1.


In the code below, zeros are removed from the end, but not from the beginning or middle, of the row-vector representation of x2 + 2x3 + 3x4 + 4x7 + 5x8.

c = gftrunc([0 0 1 2 3 0 0 4 5 0 0])
c =

     0     0     1     2     3     0     0     4     5

Introduced before R2006a