MathGroup Archive 2007

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

Search the Archive

Re: 2D Convolution

  • To: mathgroup at
  • Subject: [mg76199] Re: 2D Convolution
  • From: CKWong <CKWong.P at>
  • Date: Thu, 17 May 2007 06:13:40 -0400 (EDT)
  • References: <f29389$m7p$>

I've just learned the hard way that you cannot copy the contents of a
Mathematica notebook to a posting to this group.  My last 2 postings
had thus become gibberish.  Many apologies.

In the off-chance that you are still interested, here is my version of
the Convolve function:

Convolve[ f_, g_, x_?NumberQ, y_?NumberQ] := NIntegrate[ f[xp,yp] *
g[x-xp,y-yp] , {xp,-Infinity,Infinity}, {yp,-Infinity,Infinity} ]

Sample usage:
Convolve[SHole, Gaussian2D, 0, 0]

Plot3D[Convolve[SHole, Gaussian2D, x, y] // Evaluate, {x, -4
BeamRadius, 4
      BeamRadius}, {y, -4 BeamRadius, 4 BeamRadius}, PlotRange -> All]

  • Prev by Date: Re: Compatibility woes
  • Next by Date: Re: Integrate[s^s(1-s)^(1-s)Sin[Pi s],{s,0,1}]
  • Previous by thread: Re: 2D Convolution
  • Next by thread: Re: Re: 2D Convolution