* Bug #6979 fixed - Help page of rlist() was unclear. 30/14530/4
Charlotte HECQUET [Thu, 15 May 2014 11:25:10 +0000 (13:25 +0200)]
Change-Id: Ied00d5ea59d883fa723997d59c2c7f66d05eb663

scilab/CHANGES_5.5.X
scilab/modules/data_structures/help/en_US/rlist.xml
scilab/modules/data_structures/help/fr_FR/rlist.xml
scilab/modules/data_structures/sci_gateway/c/sci_rlist.c

index e729a74..9027938 100644 (file)
@@ -10,6 +10,8 @@ Obsolete & Removed Functions
 Scilab Bug Fixes
 ================
 
+* Bug #6979 fixed - Help page of rlist was unclear.
+
 * Bug #7203 fixed - Help page of titlepage was unclear.
 
 * Bug #7549 fixed - edit_curv did not disable standard plot menus.
index fb54193..31f279b 100644 (file)
     </refnamediv>
     <refsynopsisdiv>
         <title>Calling Sequence</title>
-        <synopsis>rlist()
-            rlist(a1 ,..., an)
+        <synopsis>[r] = rlist()
+            [r] = rlist(N, D [,dom])
         </synopsis>
     </refsynopsisdiv>
     <refsection>
+        <title>Arguments</title>
+        <variablelist>
+            <varlistentry>
+                <term>N,D</term>
+                <listitem>
+                    <para>polynomial martices.</para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>dom</term>
+                <listitem>
+                    <para>
+                        character string, or <literal>[]</literal> or a scalar.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>r</term>
+                <listitem>
+                    <para>
+                        tlist ("r" list) representing the rational fraction.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection>
         <title>Description</title>
         <para>
-            <literal>rlist(a1, ..., an)</literal> is a shortcut  to
-            <literal>tlist(['r','num';'den','dt'], a1, ..., an)</literal>.
+            <literal>rlist(N, D, dom)</literal> is a shortcut  to
+            <literal>tlist(['r','num','den','dt'], N, D, dom)</literal>.
         </para>
         <para>
-            <literal>rlist(a1, ..., an)</literal> creates a <literal>tlist</literal> with  <literal>['r','num';'den','dt']</literal> as
-            first entry and  <literal>ai</literal>'s as next entries if any. No type nor size
-            checking is done on <literal>ai</literal>'s.
+            To correspond to the domain time of a linear system, <varname>dom</varname> 
+            must be equal to <literal>'c'</literal>,<literal>'d'</literal>, <literal>[]</literal> or a scalar.
+            One the one hand, to be similar to functions as <link linkend="syslin">syslin</link>, 
+            and on the other, to use some functions as <link linkend="tf2ss">tf2ss</link>, it
+            is necessary that <varname>dom</varname> is equal to these values.
         </para>
     </refsection>
     <refsection>
@@ -42,6 +71,11 @@ W'*W
 Num=[s,s+2;1,s];
 Den=[s*s,s;s,s*s];
 rlist(Num,Den,[])
+
+H1=(1+2*s)/s^2;
+S1bis=syslin('c',H1)
+r=rlist(H1.num, H1.den, 'c')
+r == S1bis
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
@@ -56,6 +90,9 @@ rlist(Num,Den,[])
             <member>
                 <link linkend="rational">rational</link>
             </member>
+            <member>
+                <link linkend="tf2ss">tf2ss</link>
+            </member>
         </simplelist>
     </refsection>
 </refentry>
index 1bebf90..6d57967 100644 (file)
@@ -6,20 +6,49 @@
     </refnamediv>
     <refsynopsisdiv>
         <title>Séquence d'appel</title>
-        <synopsis>rlist()
-            rlist(a1,....an)
+        <synopsis>[r] = rlist()
+            [r] = rlist(N, D [,dom])
         </synopsis>
     </refsynopsisdiv>
     <refsection>
+        <title>Arguments</title>
+        <variablelist>
+            <varlistentry>
+                <term>N,D</term>
+                <listitem>
+                    <para>martices polynomiales.</para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>dom</term>
+                <listitem>
+                    <para>
+                        chaîne de caractères ou <literal>[]</literal>, ou un scalaire.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>r</term>
+                <listitem>
+                    <para>
+                        tlist (liste de type "r") représentant la fraction rationnelle.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection>
         <title>Description</title>
         <para>
-            <literal>rlist(a1,....an)</literal> est équivalent à
-            <literal>tlist(['r','num';'den','dt'], a1,....an)</literal> 
-        </para>
-        <para>
-            Crée une <literal>tlist</literal> avec <literal>['r','num';'den','dt']</literal> comme premier argument et les <literal>ai</literal> comme termes suivants s'ils sont présents dans les arguments. Aucune vérification de type ou de taille n'est faite sur les <literal>ai</literal>.
+            <literal>[r] = rlist(N, D, dom)</literal> est équivalent à
+            <literal>tlist(['r','num','den','dt'], N, D, dom)</literal>
         </para>
         <para>
+            Pour correspondre au domaine temporel d'un système linéaire, <varname>dom</varname> doit être égale à
+            <literal>'c'</literal>,<literal>'d'</literal>, <literal>[]</literal> ou à un scalaire.
+            D'une part, par analogie à des fonctions comme <link linkend="syslin">syslin</link>, 
+            et d'autre part, pour être compatible avec des fonctions comme <link linkend="tf2ss">tf2ss</link>,
+            il est nécessaire que <varname>dom</varname> soit égale à ces valeurs.
         </para>
     </refsection>
     <refsection>
@@ -31,6 +60,11 @@ W'*W
 Num=[s,s+2;1,s];
 Den=[s*s,s;s,s*s];
 rlist(Num,Den,[])
+
+H1=(1+2*s)/s^2;
+S1bis=syslin('c',H1)
+r=rlist(H1.num, H1.den, 'c')
+r == S1bis
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
@@ -45,6 +79,9 @@ rlist(Num,Den,[])
             <member>
                 <link linkend="rational">rational</link>
             </member>
+            <member>
+                <link linkend="tf2ss">tf2ss</link>
+            </member>
         </simplelist>
     </refsection>
 </refentry>
index 066f07d..5ff6056 100644 (file)
@@ -19,6 +19,9 @@ extern int C2F(mtlist)(); /* fortran */
 /*--------------------------------------------------------------------------*/
 int sci_rlist(char *fname, unsigned long fname_len)
 {
+
+    CheckInputArgument(pvApiCtx, 0, 3);
+
     if (nbInputArgument(pvApiCtx) == 2)
     {
         int lw = 0;