pylops.utils.signalprocessing.convmtx¶
- pylops.utils.signalprocessing.convmtx(h, n, offset=0)[source]¶
Convolution matrix
Makes a dense convolution matrix \(\mathbf{C}\) such that the dot product
np.dot(C, x)is the convolution of the filter \(h\) centered on offset and the input signal \(x\).Equivalent of MATLAB’s convmtx function for: -
mode='full'when used withoffset=0. -mode='same'when used withoffset=len(h)//2(after truncating the rows asC[:n])- Parameters:
- h
numpy.ndarray Convolution filter (1D array)
- n
int Number of columns of convolution matrix
- offset
int Index of the center of the filter
- h
- Returns:
- C
numpy.ndarray Convolution matrix of size \(\text{len}(h)+n-1 \times n\)
- C