Two-dimensional convolution with wrap around
C = convw2(A, B)
convw2(A, B) computes the two-dimensional convolution of matrices A and B with wrap around. Unlike the standard convolution implemented by the conv2 function, the result from this function matches that which would be obtained by a Fourier domain product, that is it treats the input as if extended periodically.
Acceptable calling profiles are:
C = convw2(A, B) - A is convolved on the left of B, that is A * B C = convw2({L, R}, B) - The convolution is L * B * R. L and R must be of the same size.