Previous Up Next

5.23.3  Convolution of two signals : convolution

convolution takes two arguments, a real vector v of length n and a real vector w of length m , and returns their convolution z=vw which is the vector of length N=n+m−1 defined as :

zk=
k
i=0
vi wki,   k=0,1,…,N−1, 

such that vj=0 for jn and wj=0 for jm . For example, input :

convolution([1,2,3],[1,-1,1,-1])

Output :

[1.0,1.0,2.0,-2.0,1.0,-3.0]

Previous Up Next