one-dimensional and two-dimensional convolution

• To: mathgroup at smc.vnet.net
• Subject: [mg69076] one-dimensional and two-dimensional convolution
• From: "bd satish" <bdsatish at gmail.com>
• Date: Tue, 29 Aug 2006 04:47:36 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Hi buddies ,

Here is the definition of a 1-dimensional discrete-time convolution
(encountered in Signals & Systems ,etc)  of two functions x[n] and
h[n] :

y[n] = Sum[ x[k] * h[n-k] , { k , -Infiniy , Infinity }]

The above command works when x[n] and y[n] are functions in the strict
sense (say , x[n] = Exp[-2*pi*n/6] UnitStep[n] and h[n] = Exp[-4*Pi*n/7]
UnitStep[n] )
But in Signal processing , we often have lists :

X= { 1,2,3,1,-1 }  , H = { 1,-4,5,6} etc.  where the entries are the
function's values at different values of n .  i.e.

X =  {  x[0] , x[1] , x[2] , x[3] , x[4] } . Similarly   H = { h[0] , h[1]
, h[2] , ... }   (, say )

Without using Sum ( and DiscreteDelta ) , is there any way to directly (&
quickly) find the convolution sum.
I'm finding convolution of lists whose lengths are typically 700 to 1000. So
the code needs be really fast.

The Mathematica command  " ListConvolve "  did not help me. Anybody plz help
me out !!

Also ,  the 2-dimensional convolution of     two-variable functions ,
f[x,y] and h[x,y]  is defined as :

z[x,y] = Sum[ Sum[ f[m,n]  * h[x-m , y-n] , { m , -Infinity, Infinity } ] ,
{ n , -Infinity , Infinity } ]

But in image processing  , we often have nested lists. In this case ,
f[x,y] and h[x,y] are matrices :

f = { { 1,2,3 } , { 4,5,6 } ,{7,8,9} } etc. Similarly  h . There are no
restrictions on the dimensions of matrices f and h .

Mathgroup , plz help me in  solving these 1-D and 2-D convolutions !!

```

• Prev by Date: Is -1^(2/5) really undefined in R?
• Next by Date: Re: Re: General--Difficulties in Understanding Mathematica Syntax
• Previous by thread: Re: Is -1^(2/5) really undefined in R?
• Next by thread: Re: one-dimensional and two-dimensional convolution