I want to perform convolution for a sequence but instead of having the indices cycle from the ends periodically, I want to apply a function, specifically Abs, to remap the indices.

Using ListConvolve, what parameters and/or modifications to the inputs could allow this output?

For example, here is my specific case. My input sequences will have equal length. Using a summation, I can obtain the results I desire, but this runs in $O(n^2)$.

For an arbitrary sequence of length 5, this would be the convolution using summation.

Table[Sum[Subscript[a, j] Subscript[b, Abs[k - j] + 1], {j, 5}], {k, 5}]
  • $\begingroup$ Can't this be expressed as a conventional convolution with a symmetric sequence b? $\endgroup$ – mikado Jun 19 '16 at 10:19

How about

k = Table[Subscript[a, j] , {j, 5}];    
l = Table[Subscript[b, 1 + Abs[j]] , {j, -4, 4}];

ListCorrelate[k, l] // Reverse // Column

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.