Creating a convolution matrix