<< cohere | FOSSEE_Signal_Processing_Toolbox | corrmtx >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > convmtx

# convmtx

Generate a convolution matrix.

### Syntax

    b = convmtx(a, n)

### Parameters

a:

  Vector. Input vector to generate the convolution matrix.

n:

  Integer. Length of the vector to convolve with.

b:

  Matrix. Convolution matrix.

### Description

This function generates the convolution matrix `b` for the input vector `a`. If `a` is a column vector, the operation `convmtx(a, n) * x` yields the convolution of `a` with another column vector `x` of length `n`. Similarly, if `a` is a row vector, the operation `x * convmtx(a, n)` yields the convolution of `a` with another row vector `x` of length `n`.

### Examples

    a = [1; 2; 3]
    n = 4
    b = convmtx(a, n)

Report an issue
<< cohere | FOSSEE_Signal_Processing_Toolbox | corrmtx >>