Re: The Behavior of CONVOL [message #7314] |
Fri, 01 November 1996 00:00  |
Ken Kump
Messages: 8 Registered: February 1996
|
Junior Member |
|
|
Kevin R. Turpie wrote:
> First, CONVOL does not appear to perform a convolution by default;
> rather it seems to do a correlation. They are similar, but give
> different results if the kernel is asymmetric.
No, the values are not normalized in any way. You need to be
aware of truncation and padd accordingly.
> Second, when CENTER is set to 0, CONVOL does a convolution in a
> strict sense *if* the input kernel function, say k(x), is defined
> so that k(x) = 0 for all x < 0. The result is usually shifted to
> the right.
> To do a true convolution with CONVOL for any kernel, it seems that
> CENTER must be set to 1 and REVERSE must be applied to each dimension
> of the kernel prior to input.
Yes, this is true. I like to **always** perform a strict
convolution. I set center=0, reverse my convolution
kernel in each direction, and padd zeros on
either side of my input function, then after the convolution,
I may truncate them to be repositioned correctly. I find this
annoying and computationally inefficient. For a convolution
of some magnitude (I think Numerical Recipies gave a number for
a 1-D case of 60) Fourier convolution is **much** faster.
--
Ken Kump
Department of Biomedical Engineering
Case Western Reserve University
Cleveland, Ohio 44106, USA
E-mail: ksk3@po.cwru.edu
|
|
|