* Bug #11664 fixed - Help page of lev had no example.
[scilab.git] / scilab / modules / signal_processing / help / en_US / filters / lev.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" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="lev">
3     <refnamediv>
4         <refname>lev</refname>
5         <refpurpose>Yule-Walker equations (Levinson's algorithm)  </refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Calling Sequence</title>
9         <synopsis>[ar, sigma2, rc]=lev(r)</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>Arguments</title>
13         <variablelist>
14             <varlistentry>
15                 <term>r</term>
16                 <listitem>
17                     <para>correlation coefficients</para>
18                 </listitem>
19             </varlistentry>
20             <varlistentry>
21                 <term>ar</term>
22                 <listitem>
23                     <para>auto-Regressive model parameters</para>
24                 </listitem>
25             </varlistentry>
26             <varlistentry>
27                 <term>sigma2</term>
28                 <listitem>
29                     <para>scale constant</para>
30                 </listitem>
31             </varlistentry>
32             <varlistentry>
33                 <term>rc</term>
34                 <listitem>
35                     <para>reflection coefficients</para>
36                 </listitem>
37             </varlistentry>
38         </variablelist>
39     </refsection>
40     <refsection>
41         <title>Description</title>
42         <para>
43             This function resolves the Yule-Walker equations using Levinson's algorithm. Generally, it is used to estimate the coefficients of an autoregressive process.
44         </para>
45     </refsection>
46     <refsection>
47         <title>Example</title>
48         <programlisting role="Example"><![CDATA[
49 b=1; //numerator
50 a=[1 -0.7 0.8]; //denominator
51 x=[1 zeros(1,99)]; //input=impulse
52 data=filter(b,a,x); //real data
53 a2=lev(data); //modelized data
54 a2=a2/a2(1); //normalization
55 m_data=filter(1,a2,x);
56 // Compare real data and modelized data
57 plot(data,"color","blue","lineStyle","none","marker","d");
58 plot(m_data,"color","red","lineStyle","none","marker","d");
59 ]]>
60         </programlisting>
61         <scilab:image>
62             b=1;
63             a=[1 -0.7 0.8];
64             x=[1 zeros(1,99)];
65             data=filter(b,a,x);
66             a2=lev(data);
67             a2=a2/a2(1);
68             m_data=filter(1,a2,x);
69             plot(data,"color","blue","lineStyle","none","marker","d");
70             plot(m_data,"color","red","lineStyle","none","marker","d");
71         </scilab:image>
72     </refsection>
73 </refentry>