The Behavior of CONVOL [message #7324] |
Thu, 31 October 1996 00:00  |
Kevin R. Turpie
Messages: 3 Registered: July 1995
|
Junior Member |
|
|
I've found the behavior of CONVOL to be a bit confusing. Please
let me know if I'm missing something, but here are my observations:
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.
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.
I spoke with RSI Tech Support about this last February and they
felt the solution would be to more clearly explain CONVOL in future
releases of the RG. Hmmm. Anyway, try it out and see if you get
the same results.
Thanks,
Kevin
PS - If your interested, I did create a routine to perform
two dimensional convolutions using a FFT. It is *very* fast
and behaves like CONVOL with the EDGE_WRAP keyword on and
the kernel oriented properly.
|
|
|