pylops.utils.signalprocessing.convmtx(h, n)[source]

Convolution matrix

Equivalent of MATLAB’s convmtx function . Makes a dense convolution matrix \(\mathbf{C}\) such that the dot product, x) is the convolution of the filter \(h\) and the input signal \(x\).

h : np.ndarray

Convolution filter (1D array)

n : int

Number of columns (if \(len(h) < n\)) or rows (if \(len(h) \geq n\)) of convolution matrix

C : np.ndarray

Convolution matrix of size \(len(h)+n-1 \times n\) (if \(len(h) < n\)) or \(n \times len(h)+n-1\) (if \(len(h) \geq n\))