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.

gffilter (prime Galois field)

Filter data using polynomials over prime Galois field


y = gffilter(b,a,x)
y = gffilter(b,a,x,p)



This function performs computations in GF(pm), where p is prime. To work in GF(2m), use the filter function with Galois arrays. For details, see Filtering.

y = gffilter(b,a,x) filters the data in vector x with the filter described by vectors b and a. The vectors b, a and x must be in GF(2), that is, be binary and y is also in GF(2).

y = gffilter(b,a,x,p) filters the data x using the filter described by vectors a and b. y is the filtered data in GF(p). p is a prime number, and all entries of a and b are between 0 and p-1.

By definition of the filter, y solves the difference equation

a(1)y(n) = b(1)x(n)+b(2)x(n-1)+b(3)x(n-2)+...+b(B+1)x(n-B) 


  • A+1 is the length of the vector a

  • B+1 is the length of the vector b

  • n varies between 1 and the length of the vector x.

The vector a represents the degree-na polynomial



The impulse response of a particular filter is given in the code and diagram below.

b = [1 0 0 1 0 1 0 1];
a = [1 0 1 1];
y = gffilter(b,a,[1,zeros(1,19)]);
axis([0 20 -.1 1.1])

See Also

| |

Introduced before R2006a