1cbf7cd3c8937e2622e78fd032cb35b309ed5c9a
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="rational">
3   <info>
4     <pubdate>\$LastChangedDate\$</pubdate>
5   </info>
6   <refnamediv>
7     <refname>rational</refname>
8     <refpurpose> Scilab objects, rational in Scilab</refpurpose>
9   </refnamediv>
10   <refsection>
11     <title>Description</title>
12     <para>
13       A rational <literal>r</literal> is a quotient of two polynomials <literal>r=num/den</literal>.
14       The internal representation of a rational is a list.
15       <literal>r=tlist('['r','num','den','dt'],num,den,[])</literal> is the same as <literal>r=num/den</literal>.
16       A rational matrix can be defined with the usual syntax
17       e.g. <literal>[r11,r12;r21,r22]</literal> is a 2x2 matrix where <literal>rij</literal> are
18       1x1 rationals.
19       A rational matrix can also be defined as above as a list
20       <literal>tlist(['r','num','den','dt'],num,den,[])</literal> with <literal>num</literal> and <literal>den</literal> polynomial matrices.
21     </para>
22   </refsection>
23   <refsection>
24     <title>Examples</title>
25     <programlisting role="example"><![CDATA[
26 s=poly(0,'s');
27 W=[1/s,1/(s+1)]
28 W'*W
29 Num=[s,s+2;1,s];Den=[s*s,s;s,s*s];
30 tlist(['r','num','den','dt'],Num,Den,[])
31 H=Num./Den
32 syslin('c',Num,Den)
33 syslin('c',H)
34 [Num1,Den1]=simp(Num,Den)
35  ]]></programlisting>
36   </refsection>
37   <refsection role="see also">
38     <title>See Also</title>
39     <simplelist type="inline">
40       <member>