| Communications Toolbox | ![]() |
This toolbox offers two equivalent ways to convolve a pair of Galois vectors:
Use the conv function, as described in Multiplication and Division of Polynomials. This works because convolving two vectors is equivalent to multiplying the two polynomials whose coefficients are the entries of the vectors.
Use the convmtx function to compute the convolution matrix of one of the vectors, and then multiply that matrix by the other vector. This works because convolving two vectors is equivalent to filtering one of the vectors by the other. The equivalence permits the representation of a digital filter as a convolution matrix, which you can then multiply by any Galois vector of appropriate length.
Tip If you need to convolve large Galois vectors, then multiplying by the convolution matrix might be faster than using conv. |
The example below computes the convolution matrix for a vector b in GF(4), representing the numerator coefficients for a digital filter. It then illustrates the two equivalent ways to convolve b with x over the Galois field.
m = 2; b = gf([1 2 3]',m); n = 3; x = gf(randint(n,1,2^m),m); C = convmtx(b,n); % Compute convolution matrix. v1 = conv(b,x); % Use conv to convolve b with x v2 = C*x; % Use C to convolve b with x.
| Filtering | Discrete Fourier Transform | ![]() |
© 1994-2005 The MathWorks, Inc.