% convolve.m  L Braile 3/26/2006
% discrete convolution of signals a(la) and b(lb) to obtain c(lc)
function c = convolve(a,la,b,lb)
lc = la + lb - 1;
c = zeros(1,lc);
for i = 1:la
    for j = 1:lb
        k = i+j-1;
        c(k) = c(k) + a(i)*b(j);
    end
end
