<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>convol</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="convol"> convolution</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[y]=convol(h,x)  </CALLING_SEQUENCE_ITEM>
    <CALLING_SEQUENCE_ITEM>[y,e1]=convol(h,x,e0)  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>x,h</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>:input sequences (<VERB>h</VERB> is a &quot;short&quot; sequence, <VERB>x</VERB> a &quot;long&quot; one)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>e0</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: old tail to overlap add (not used in first call)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>y</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: output of convolution</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>e1</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: new tail to overlap add (not used in last call)</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P>
    calculates the convolution <VERB>y= h*x</VERB> of two
    discrete sequences by using the fft.  Overlap add method can be used.</P>
    <P>
    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]</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
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
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>corr</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>fft</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>pspect</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
  <AUTHOR>F. D , C. Bunks Date 3 Oct. 1988; ;   </AUTHOR>
</MAN>
