Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: What is ListConvolve doing here?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46147] Re: What is ListConvolve doing here?
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Sat, 7 Feb 2004 23:36:02 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 2/7/04 at 4:02 AM, ersekjm at tqci.net (Ted Ersek) wrote:

> Consider the following:
>    Off[General::spell1];
>    Clear["Global`*"];
>    listA={ a1, a2, a3, a4 };
>    listB={ b1, b2, b3, b4, b5, b6 };

<snip>

> Can anyone help me understand what ListConvolve is doing in the
> examples below.  The output in these examples seems very different
> from the convolution I learned about in school. 

> ListConvolve[listB, listA, {1,-1}, listA, Times, List] 
> ListConvolve[ listA,listB, {1,-1}, {s1,s2}, Times, List]

In comparing these examples to the others I snipped, it appears the main difference is arguement (1, -1}. This specifies maximal overhang of the kernel to both ends of the list. Specifically, that means aligning each element of the kernel with each element of the list being operated upon.

Clearly, at the ends of the list padding has to be done which is specified by the 4th arguement. Taking your last example, the padding adds {s2, s1, s2} before listB and {s1, s2, s1} at the end of listB. Then ListConvolve works on this new list.

You can see this is what ListConvolve is doing by comparing the output of

List@@@ListConvolve[listA, Flatten@{s2, s1, s2, listB, s1, s2, s1}] with

Sort/@ListConvolve[listA, listB, {1, -1}, {s1, s2}, Times, List]

(Sorting the sublists is needed since Mathematica orders the output of Plus)

--
To reply via email subtract one hundred and four


  • Prev by Date: Can't display Times font in Windows XP
  • Next by Date: Re: random numbers?
  • Previous by thread: What is ListConvolve doing here?
  • Next by thread: computation of autocovariance