# convolution: Y(Z) = X(Z) * B(Z)
#
subroutine convolve( nb, bb, nx, xx, yy )
integer nb # number of coefficients in filter
integer nx # number of coefficients in input
# number of coefficients in output will be nx+nb-1
real bb(nb) # filter coefficients
real xx(nx) # input trace
real yy(1) # output trace
integer ib, ix, iy, ny
ny = nx + nb -1
call null( yy, ny)
do ib= 1, nb
do ix= 1, nx
yy( ix+ib-1) = yy( ix+ib-1) + xx(ix) * bb(ib)
return; end
This program is written in a language called Ratfor,
a ``rational'' dialect of Fortran.
It is similar to the Matlab language.
You are not responsible for anything in this program,
but, if you are interested,
more details in the last chapter of PVI