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.


Convolution matrix of Galois field vector


A = convmtx(c,n)


A convolution matrix is a matrix, formed from a vector, whose inner product with another vector is the convolution of the two vectors.

A = convmtx(c,n) returns a convolution matrix for the Galois vector c. The output A is a Galois array that represents convolution with c in the sense that conv(c,x) equals

  • A*x, if c is a column vector and x is any Galois column vector of length n. In this case, A has n columns and m+n-1 rows.

  • x*A, if c is a row vector and x is any Galois row vector of length n. In this case, A has n rows and m+n-1 columns.


The code below illustrates the equivalence between using the conv function and multiplying by the output of convmtx.

m = 4;
c = gf([1; 9; 3],m); % Column vector
n = 6;
x = gf(randi([0 2^m-1],n,1),m);
ck1 = isequal(conv(c,x), convmtx(c,n)*x) % True
ck2 = isequal(conv(c',x'),x'*convmtx(c',n)) % True

The output is

ck1 =


ck2 =


Introduced before R2006a