Two months ago, I asked a question here
And @nikie give me a solution:
The intuitive way to understand
ListCorrelate
is that the kernel is "moved" to every position in the array, and the sum of the products between the kernel values and the array values at that position is stored in the output array:
I make a graphic to show this process as shown below:
However, I cannot understand this built-in function (contain $\{K_L,K_R\}$) when it works for 2-dimensional data.
For example,
$\{K_L,K_R\}=\{2,2\}$
ListCorrelate[
{{x, y, z}, {u, v, w}},
{{a, b, c, d}, {e, f, g, h}, {i,j, k, l}},
{2, 2}]
$\{K_L,K_R\}=\{2,3\}$ or $\{K_L,K_R\}=\{1,3\}$ or $\{K_L,K_R\}=\{-1,3\}$
According this result, I figure the picture:
However, I cannot find the regulation, namely, how does ListCorrelate
pad?
Update
Thanks for @DumpsterDoofus's solution, I know how the ListCorrelate
work in 1-dimensional data when it contains ${k_L,k_R}$ (as shown below)
the ListCorrelate
work in 1-dimensional data when it contains $\{k_L,k_R\}$
And now my main confusion is ListCorrelate
works in 2-dimensional data.
Is there a analogous graphic to show the process in 2-dimensional data?