* Bug #11670 to 11676 fixed - Add examples in the signal processing help pages.
[scilab.git] / scilab / modules / signal_processing / help / en_US / wfir.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="wfir">
3     <refnamediv>
4         <refname>wfir</refname>
5         <refpurpose> linear-phase FIR filters</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Calling Sequence</title>
9         <synopsis>[wft,wfm,fr]=wfir(ftype,forder,cfreq,wtype,fpar)</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>Arguments</title>
13         <variablelist>
14             <varlistentry>
15                 <term>ftype</term>
16                 <listitem>
17                     <para>
18                         string : <literal>'lp','hp','bp','sb'</literal> (filter type)
19                     </para>
20                 </listitem>
21             </varlistentry>
22             <varlistentry>
23                 <term>forder</term>
24                 <listitem>
25                     <para>
26                         Filter order (pos integer)(odd for <literal>ftype='hp'</literal> or <literal>'sb'</literal>)
27                     </para>
28                 </listitem>
29             </varlistentry>
30             <varlistentry>
31                 <term>cfreq</term>
32                 <listitem>
33                     <para>
34                         2-vector of cutoff frequencies (<literal>0&lt;cfreq(1),cfreq(2)&lt;.5</literal>)  only <literal>cfreq(1)</literal> is used when <literal>ftype='lp'</literal> or <literal>'hp'</literal>
35                     </para>
36                 </listitem>
37             </varlistentry>
38             <varlistentry>
39                 <term>wtype</term>
40                 <listitem>
41                     <para>
42                         Window type (<literal>'re','tr','hm','hn','kr','ch'</literal>)
43                     </para>
44                 </listitem>
45             </varlistentry>
46             <varlistentry>
47                 <term>fpar</term>
48                 <listitem>
49                     <para>
50                         2-vector of window parameters. Kaiser window <literal>fpar(1)&gt;0 fpar(2)=0</literal>. Chebyshev window  <literal>fpar(1)&gt;0, fpar(2)&lt;0</literal> or <literal>fpar(1)&lt;0, 0&lt;fpar(2)&lt;.5</literal>
51                     </para>
52                 </listitem>
53             </varlistentry>
54             <varlistentry>
55                 <term>wft</term>
56                 <listitem>
57                     <para>time domain filter coefficients</para>
58                 </listitem>
59             </varlistentry>
60             <varlistentry>
61                 <term>wfm</term>
62                 <listitem>
63                     <para>frequency domain filter response on the grid fr</para>
64                 </listitem>
65             </varlistentry>
66             <varlistentry>
67                 <term>fr</term>
68                 <listitem>
69                     <para>Frequency grid</para>
70                 </listitem>
71             </varlistentry>
72         </variablelist>
73     </refsection>
74     <refsection>
75         <title>Description</title>
76         <para>
77             Function which makes linear-phase, FIR low-pass, band-pass,
78             high-pass, and stop-band filters
79             using the windowing technique.
80             Works interactively if called with no arguments.
81         </para>
82     </refsection>
83     <refsection>
84         <title>Examples</title>
85         <programlisting role="example"><![CDATA[ 
86 [h,hm,fr]=wfir("lp",33,[.2 0],"hm",[0 0])
87  ]]></programlisting>
88     </refsection>
89 </refentry>