Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - 日本語 - Русский
Ajuda do Scilab >> Processamento de Sinais > Convolution - Correlation > convol




y = convol(h, x)
[y,e1] = convol(h, x, e0)



a vector, first input sequence ("short" one)


a vector, second input sequence ( "long" one)


a vector,old tail to overlap add (not used in first call)


a vector, the convolution.


new tail to overlap add (not used in last call)


Calculates the convolution y= h*x of two discrete sequences by using the fft. The convolution is defined as follows:

y_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.


x = 1:3;
h1 = [1,0,0,0,0];
h2 = [0,1,0,0,0];
h3 = [0,0,1,0,0];
x1 = convol(h1, x)
x2 = convol(h2, x)
x3 = convol(h3, x)
convol(h1+h2+h3, x)
p1 = poly(x,'x','coeff')
p2 = poly(h1+h2+h3, 'x', 'coeff')
p1 * p2

See also

  • corr — correlation, covariance
  • fft — Direct or inverse Fast Fourier Transform of a vector, matrix, or hypermatrix
  • pspect — two sided cross-spectral estimate between 2 discrete time signals using the Welch's average periodogram method.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:35:23 CET 2022