next up previous contents
Next: Filtering with convolution Up: Convolution Previous: Mechanics of convolution   Contents

Convolution and product of polynomials

There exist a deep connection between the convolution and the product of polynomials. Scilab incorporates polynomials as a built-in structure.


-->a = [1 2 3];  
 
-->b = [2 1 3];    
 
-->apoly = poly(a,'x','c')
 apoly  =
 
               2  
    1 + 2x + 3x   
 
-->bpoly = poly(b,'x','c')
 bpoly  =
 
              2  
    2 + x + 3x   
 
-->cpoly = apoly * bpoly
 cpoly  =
 
                2    3    4  
    2 + 5x + 11x + 9x + 9x   
 
-->coeff(cpoly)
 ans  =
 
!   2.    5.    11.    9.    9. !

-->convol(a,b)
 ans  =
 
!   2.    5.    11.    9.    9. !

Several interesting things can be deduced from this form of representation. First of all we created the polynomials with the coefficients contained in vectors `a' and `b', then we made the product of both polynomials and finally we extracted their coefficients. We can see that the order of the result is the sum of the order of the factors. Since the length of the array containing the coefficients is equal to the order of the polynomials plus one, we can see that the length of the convolution of two signals is the sum of its lengths minus one.



je 2006-10-13