<?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * This help file was generated from filtfilt.sci using help_from_sci().
 *
 -->

<refentry version="5.0-subset Scilab" xml:id="filtfilt" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:scilab="http://www.scilab.org"
          xmlns:db="http://docbook.org/ns/docbook">

  <refnamediv>
    <refname>filtfilt</refname>
    <refpurpose>Forward and reverse filter the signa</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Syntax</title>
   <synopsis>
   y = filtfilt(b, a, x)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
        <varlistentry>
            <term>b:</term>
            <listitem><para> Numerator coefficients of the filter.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>a:</term>
            <listitem><para> Denominator coefficients of the filter.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>x:</term>
            <listitem><para> Input signal.</para></listitem>
        </varlistentry>
        <varlistentry>
            <term>y:</term>
            <listitem><para> Zero-phase filtered signal.</para></listitem>
        </varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
Forward and reverse filter the signal.
This corrects for phase distortion introduced by a one-pass filter, though it does square the magnitude response in the process. That’s the theory at least. In practice the phase correction is not perfect, and magnitude response is distorted, particularly in the stop band.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
[b, a]=butter(3, 0.1)                  // 5 Hz low-pass filter
t = 0:0.01:1.0;                         // 1 second sample
x=sin(2*%pi*t*2.3)+0.25*rand(size(t,1),size(t,2),"normal");  // 2.3 Hz sinusoid+noise
y = filtfilt(b,a,x);
z = filter(b,a,x); // apply filter
plot(t,x,t,y,t,z);
legend("data","filtfilt","filter");

   ]]></programlisting>
</refsection>

<refsection role="see also">
   <title>See also</title>
   <simplelist type="inline">
   <member><link linkend="filter">filter</link></member>
   </simplelist>
</refsection>

<refsection>
   <title>Authors</title>
   <simplelist type="vert">
   <member>Rashmi Patankar, FOSSEE IIT Bombay</member>
   </simplelist>
</refsection>
</refentry>
