I did a search for discrete convolution functions in EMT, and there is no function with the letters ‘conv’ in them that I could find. Matlab has the function ** conv(a,b)** to perform convolution on two vectors

**and**

*a***. The function**

*b***in Matlab performs deconvolution. My college textbook**

*deconv(a,b)**indicates that discrete convolution is essentially polynomial multiplication.*

**I****by Gilbert Strang***ntr*oduction to Applied MathematicsFortunately EMT has the function ** polymult(a,b)** which does the same thing as

**in Matlab, and**

*conv(a,b)***does the same thing as**

*polydiv(a,b)***in Matlab.**

*deconv(a,b)*
Rene GrothmannYou are right, polymult() does the same.

But in fact, for large vectors this is not the fastest way to go. It is faster to do a FFT of both polynomials (padded with zeros), multiply the results, and do an inverse FFT. I have put this into a function, which I should add into EMT.

>polymult(1:10,1:3)

[1, 4, 10, 16, 22, 28, 34, 40, 46, 52, 47, 30]

>function fftconv (a,b) ...

$n=2^(logbase(cols(a)+cols(b),2)+1);

$a1=zeros(1,n); a1[1:cols(a)]=a;

$b1=zeros(1,n); b1[1:cols(b)]=b;

$return real(ifft(fft(a1)*fft(b1)))[1:cols(a)+cols(b)-1];

$endfunction

>fftconv(1:10,1:3)

[1, 4, 10, 16, 22, 28, 34, 40, 46, 52, 47, 30]

Rene GrothmannUpon tests of this i discovered are numerical issues for larger vectors, and it is not faster as implemented above. So maybe it is better to use polymult(). The recent version of EMT can define aliases, which might be a good idea for conv().