convolconvolutionSyntax
[y]=convol(h,x)
[y,e1]=convol(h,x,e0)
Argumentsha vector, first input sequence ("short" one) xa vector, second input sequence ( "long" one)e0a vector,old tail to overlap add (not used in first
call)
ya vector, the convolution. e1new tail to overlap add (not used in last call)Description
Calculates the convolution y= h*x of two discrete
sequences by using the fft. The convolution is defined as follows:
yk=∑jhj∗xk+1−jy_k=sum_j h_j*x_{k+1-j}
Overlap add method can be used.USE OF OVERLAP ADD METHOD: For
x=[x1,x2,...,xNm1,xN] First call is
[y1,e1]=convol(h,x1); Subsequent calls :
[yk,ek]=convol(h,xk,ekm1); Final call :
[yN]=convol(h,xN,eNm1); Finally
y=[y1,y2,...,yNm1,yN].
The algorithm based on the convolution definition is
implemented for polynomial
product: y=convol(h,x) is equivalent
to y=coeff(poly(h,'z','c')*poly(x,'z','c') but
much more efficient if x is a "long" array.
ExamplesSee Also
corr
fft
pspect