* Get ride of the useless tag
[scilab.git] / scilab / modules / polynomials / help / en_US / poly.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="poly">
3     <refnamediv>
4         <refname>poly</refname>
5         <refpurpose>polynomial definition</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Calling Sequence</title>
9         <synopsis>p=poly(a,vname, ["flag"])</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>Arguments</title>
13         <variablelist>
14             <varlistentry>
15                 <term>a</term>
16                 <listitem>
17                     <para>matrix or real number</para>
18                 </listitem>
19             </varlistentry>
20             <varlistentry>
21                 <term>vname</term>
22                 <listitem>
23                     <para>String, the symbolic variable name. If the string have more
24                         than 4 characters only the first 4 are taken into account.
25                     </para>
26                 </listitem>
27             </varlistentry>
28             <varlistentry>
29                 <term>"flag"  </term>
30                 <listitem>
31                     <para>
32                         string ("roots", "coeff"), default value is <literal>"roots"</literal>.
33                     </para>
34                 </listitem>
35             </varlistentry>
36         </variablelist>
37     </refsection>
38     <refsection>
39         <title>Description</title>
40         <variablelist>
41             <varlistentry>
42                 <term>
43                     If <literal>a</literal> is a matrix,
44                 </term>
45                 <listitem>
46                     <para>
47                         <literal>p</literal> is the characteristic
48                         polynomial i.e. <literal>determinant(x*eye()-a)</literal>, <literal>x</literal> being
49                         the symbolic variable.
50                     </para>
51                 </listitem>
52             </varlistentry>
53             <varlistentry>
54                 <term>If v is a vector,</term>
55                 <listitem>
56                     <itemizedlist>
57                         <listitem>
58                             <para>
59                                 <literal>poly(v,"x",["roots"])</literal>  is the polynomial
60                                 with <literal>roots</literal> the entries of <literal>v</literal> and
61                                 <literal>"x"</literal> as formal variable. (In this case,
62                                 <literal>roots</literal> and   <literal>poly</literal> are inverse functions). 
63                                 Note that Infinite roots gives zero  highest degree coefficients. 
64                             </para>
65                         </listitem>
66                         <listitem>
67                             <para>
68                                 <literal>poly(v,"x","coeff")</literal> creates the
69                                 polynomial with symbol <literal>"x"</literal> and with coefficients
70                                 the entries of <literal>v</literal> (<literal>v(1)</literal> is the constant term 
71                                 of the polynomial). (Here <literal>poly</literal> and <literal>coeff</literal> are 
72                                 inverse functions).
73                             </para>
74                         </listitem>
75                     </itemizedlist>
76                 </listitem>
77             </varlistentry>
78         </variablelist>
79         <para>
80             <literal>s=poly(0,"s")</literal> is the seed for defining
81             polynomials with symbol <literal>"s"</literal>.
82         </para>
83     </refsection>
84     <refsection>
85         <title>Examples</title>
86         <programlisting role="example"><![CDATA[ 
87 s=poly(0,"s");
88 p=1+s+2*s^2;
89 A=rand(2,2);
90 poly(A,"x")
91 //rational fractions
92 h=(1+2*%s)/poly(1:4,'s','c')
93  ]]></programlisting>
94     </refsection>
95     <refsection role="see also">
96         <title>See Also</title>
97         <simplelist type="inline">
98             <member>
99                 <link linkend="coeff">coeff</link>
100             </member>
101             <member>
102                 <link linkend="roots">roots</link>
103             </member>
104             <member>
105                 <link linkend="varn">varn</link>
106             </member>
107             <member>
108                 <link linkend="horner">horner</link>
109             </member>
110             <member>
111                 <link linkend="derivat">derivat</link>
112             </member>
113             <member>
114                 <link linkend="matrices">matrices</link>
115             </member>
116             <member>
117                 <link linkend="rational">rational</link>
118             </member>
119         </simplelist>
120     </refsection>
121 </refentry>