pylops.utils.signalprocessing.convmtx#
- 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
np.dot(C, x)
is the convolution of the filter \(h\) and the input signal \(x\).- Parameters
- h
np.ndarray
Convolution filter (1D array)
- n
int
Number of columns (if \(\text{len}(h) < n\)) or rows (if \(\text{len}(h) \geq n\)) of convolution matrix
- h
- Returns
- C
np.ndarray
Convolution matrix of size \(\text{len}(h)+n-1 \times n\) (if \(\text{len}(h) < n\)) or \(n \times \text{len}(h)+n-1\) (if \(\text{len}(h) \geq n\))
- C