Help check: validate the help files on compilation against a derivated docbook schema
[scilab.git] / scilab / modules / elementary_functions / help / en_US / matrixoperations / cumsum.xml
index df228af..85166a3 100644 (file)
@@ -1,69 +1,56 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2010 - Serge Steer - INRIA
- * 
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at    
- * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
- *
- -->
-<refentry version="5.0-subset Scilab" xml:id="cumsum" xml:lang="en"
-          xmlns="http://docbook.org/ns/docbook"
-          xmlns:xlink="http://www.w3.org/1999/xlink"
-          xmlns:svg="http://www.w3.org/2000/svg"
-          xmlns:ns5="http://www.w3.org/1999/xhtml"
-          xmlns:mml="http://www.w3.org/1998/Math/MathML"
-          xmlns:db="http://docbook.org/ns/docbook">
+<!-- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab * 
+       Copyright (C) 2010 - Serge Steer - INRIA * * This file must be used under 
+       the terms of the CeCILL. * This source file is licensed as described in the 
+       file COPYING, which * you should have received as part of this distribution. 
+       The terms * are also available at * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 
+       * -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook">
   <info>
     <pubdate>$LastChangedDate$</pubdate>
   </info>
-
   <refnamediv>
     <refname>cumsum</refname>
-
     <refpurpose>cumulative sum of array elements</refpurpose>
   </refnamediv>
-
   <refsynopsisdiv>
     <title>Calling Sequence</title>
-
-    <synopsis>y=cumsum(x)
-    y=cumsum(x,orientation)
-    y=cumsum(x,outtype)
-    y=cumsum(x,orientation,outtype)
-    </synopsis>
+    <synopsis>y=cumsum(x)</synopsis>
+    <synopsis>y=cumsum(x,orientation)</synopsis>
+    <synopsis>y=cumsum(x,outtype)</synopsis>
+    <synopsis>y=cumsum(x,orientation,outtype)</synopsis>
   </refsynopsisdiv>
-
   <refsection>
     <title>Arguments</title>
-
     <variablelist>
       <varlistentry>
         <term>x</term>
-
         <listitem>
-          <para>
-            an array of  reals, complex, booleans,  polynomials or
-          rational fractions.
-          </para>
+          <para>an array of reals, complex, booleans, polynomials or
+                                               rational fractions.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term>orientation</term>
         <listitem>
           <para>
-            This argument can be</para>
-            <itemizedlist>
-              <listitem>
-                <para>either a string with possible values <literal>"*"</literal>, <literal>"r"</literal>, 
-                <literal>"c"</literal> or  <literal>"m"</literal></para>
-              </listitem>
-              <listitem>
-                <para>or a number with positive integer value</para>
-              </listitem>
+                                               This argument can be</para>
+          <itemizedlist>
+            <listitem>
+              <para>
+                                                               either a string with possible values
+                                                               <literal>"*"</literal>
+                                                               ,
+                                                               <literal>"r"</literal>
+                                                               ,
+                                                               <literal>"c"</literal>
+                                                               or
+                                                               <literal>"m"</literal>
+                                                       </para>
+            </listitem>
+            <listitem>
+              <para>or a number with positive integer value</para>
+            </listitem>
           </itemizedlist>
         </listitem>
       </varlistentry>
         <term>outtype</term>
         <listitem>
           <para>
-            a string with possible values <literal>"native"</literal> or <literal>"double"</literal>. </para>
+                                               a string with possible values
+                                               <literal>"native"</literal>
+                                               or
+                                               <literal>"double"</literal>
+                                               .
+                                       </para>
         </listitem>
       </varlistentry>
-
       <varlistentry>
         <term>y</term>
-
         <listitem>
           <para>scalar or array</para>
         </listitem>
       </varlistentry>
     </variablelist>
   </refsection>
-
   <refsection>
     <title>Description</title>
-
-    <para>For an array <literal>x</literal>,
-    <literal>y=cumsum(x)</literal> returns in the scalar <literal>y</literal> the
-    cumulative sum of all the elements of <literal>x</literal>.</para>
-
-    <para><literal>y=cumsum(x,orientation)</literal> returns in
-    <literal>y</literal> the cumulative sum of <literal>x</literal> along the
-    dimension given by <literal>orientation</literal>:</para>
-
+    <para>
+                       For an array
+                       <literal>x</literal>
+                       ,
+                       <literal>y=cumsum(x)</literal>
+                       returns in the scalar
+                       <literal>y</literal>
+                       the
+                       cumulative sum of all the elements of
+                       <literal>x</literal>
+                       .
+               </para>
+    <para><literal>y=cumsum(x,orientation)</literal>
+                       returns in
+                       <literal>y</literal>
+                       the cumulative sum of
+                       <literal>x</literal>
+                       along the
+                       dimension given by
+                       <literal>orientation</literal>
+                       :
+               </para>
     <itemizedlist>
       <listitem>
-        <para>if <literal>orientation</literal> is equal to 1 or "r" then</para>
-        <para><latex> <![CDATA[ y(\mathbf{l},j) = \sum_{\mathbf{i}=1}^l x(\mathbf{i},j)]]> </latex></para> 
-        <para>or </para> 
-        <para><latex> <![CDATA[ y(\mathbf{l},j,k,\ldots) = \sum_{\mathbf{i}=1}^l x(\mathbf{i},j,k,\ldots)]]> </latex> </para>
+        <para>
+                                       if
+                                       <literal>orientation</literal>
+                                       is equal to 1 or "r" then
+                               </para>
+        <para>
+          <latex><![CDATA[ y(\mathbf{l},j) = \sum_{\mathbf{i}=1}^l x(\mathbf{i},j)]]></latex>
+        </para>
+        <para>or </para>
+        <para>
+          <latex><![CDATA[ y(\mathbf{l},j,k,\ldots) = \sum_{\mathbf{i}=1}^l x(\mathbf{i},j,k,\ldots)]]></latex>
+        </para>
       </listitem>
       <listitem>
-        <para>Si <literal>orientation</literal>  est égal à  2 ou "c" alors:</para>
-        <para><latex><![CDATA[ y(i,\mathbf{l}) = \sum_{\mathbf{j}=1}^l x(i,{\mathbf{j})]]> </latex></para> 
-        <para> or </para> 
-        <para><latex><![CDATA[ y(i,\mathbf{l},k,\ldots) = \sum_{\mathbf{j}=1}^l x(i,\mathbf{j},k,\ldots)]]> </latex> </para>
+        <para>
+                                       Si
+                                       <literal>orientation</literal>
+                                       est égal à 2 ou "c" alors:
+                               </para>
+        <para>
+          <latex><![CDATA[ y(i,\mathbf{l}) = \sum_{\mathbf{j}=1}^l x(i,{\mathbf{j})]]></latex>
+        </para>
+        <para> or </para>
+        <para>
+          <latex><![CDATA[ y(i,\mathbf{l},k,\ldots) = \sum_{\mathbf{j}=1}^l x(i,\mathbf{j},k,\ldots)]]></latex>
+        </para>
       </listitem>
       <listitem>
-        <para>if <literal>orientation</literal> is equal to n  then</para>
-        <para><latex><![CDATA[ y(i_1,\ldots,i_{n-1},\mathbf{l},i_{n+1},\ldots) = \sum_{\mathbf{i_n}=1}^l x(i_1,\ldots,i_{n-1},\mathbf{i_n},i_{n+1},\ldots)]]> </latex> </para>
+        <para>
+                                       if
+                                       <literal>orientation</literal>
+                                       is equal to n then
+                               </para>
+        <para>
+          <latex><![CDATA[ y(i_1,\ldots,i_{n-1},\mathbf{l},i_{n+1},\ldots) = \sum_{\mathbf{i_n}=1}^l x(i_1,\ldots,i_{n-1},\mathbf{i_n},i_{n+1},\ldots)]]></latex>
+        </para>
       </listitem>
       <listitem>
-        <para><literal>y=cumsum(x,"*")</literal> is equivalent to <literal>y=cumsum(x)</literal> </para>
+        <para><literal>y=cumsum(x,"*")</literal>
+                                       is equivalent to
+                                       <literal>y=cumsum(x)</literal>
+                               </para>
       </listitem>
       <listitem>
-        <para><literal>y=cumsum(x,"m")</literal> is equivalent to
-        <literal>y=cumsum(x,orientation)</literal> where
-        <literal>orientation</literal> is the index of the
-        first dimension of  <literal>x</literal> that is greater than 1. This option is used for
-         Matlab compatibility.</para>
+        <para><literal>y=cumsum(x,"m")</literal>
+                                       is equivalent to
+                                       <literal>y=cumsum(x,orientation)</literal>
+                                       where
+                                       <literal>orientation</literal>
+                                       is the index of the
+                                       first dimension of
+                                       <literal>x</literal>
+                                       that is greater than 1. This option is used for
+                                       Matlab
+                                       compatibility.
+                               </para>
       </listitem>
     </itemizedlist>
-
-    <para></para>
-    <para>The <literal>outtype</literal>  argument rules the way the summation is done:</para>
+    <para/>
+    <para>
+                       The
+                       <literal>outtype</literal>
+                       argument rules the way the summation is done:
+               </para>
     <itemizedlist>
       <listitem>
-        <para>For arrays of floats, of polynomials, of rational
-        fractions, the evaluation is always done using floating points
-        computations. The <literal>"double"</literal> or <literal>"native"</literal> options are equivalent.</para>
+        <para>
+                                       For arrays of floats, of polynomials, of rational
+                                       fractions, the
+                                       evaluation is always done using floating points
+                                       computations. The
+                                       <literal>"double"</literal>
+                                       or
+                                       <literal>"native"</literal>
+                                       options are equivalent.
+                               </para>
       </listitem>
       <listitem>
         <para>For arrays of integers,</para>
-        <para> if <literal>outtype="native"</literal> the evaluation is done using integer
-        computations (modulo 2^b, where b is the number of bits used),</para>
-         <para> if <literal>outtype="double"</literal> the evaluation is done using floating point
-        computations.</para>
-        <para>The default value is <literal>outtype="native"</literal>.</para>
+        <para>
+                                       if
+                                       <literal>outtype="native"</literal>
+                                       the evaluation is done using integer
+                                       computations (modulo 2^b, where
+                                       b is the number of bits used),
+                               </para>
+        <para>
+                                       if
+                                       <literal>outtype="double"</literal>
+                                       the evaluation is done using floating point
+                                       computations.
+                               </para>
+        <para>
+                                       The default value is
+                                       <literal>outtype="native"</literal>
+                                       .
+                               </para>
       </listitem>
       <listitem>
         <para>For arrays of booleans,</para>
-        <para> if <literal>outtype="native"</literal> the evaluation is done using boolean
-        computations ( + is replaced by |),</para>
-         <para> if <literal>outtype="double"</literal> the evaluation is done using floating point
-        computations (%t values are replaced by 1 and %f values by 0).</para>
-         <para>The default value is <literal>outtype="double"</literal>.</para>
+        <para>
+                                       if
+                                       <literal>outtype="native"</literal>
+                                       the evaluation is done using boolean
+                                       computations ( + is replaced by
+                                       |),
+                               </para>
+        <para>
+                                       if
+                                       <literal>outtype="double"</literal>
+                                       the evaluation is done using floating point
+                                       computations (%t values
+                                       are replaced by 1 and %f values by 0).
+                               </para>
+        <para>
+                                       The default value is
+                                       <literal>outtype="double"</literal>
+                                       .
+                               </para>
       </listitem>
-
     </itemizedlist>
   </refsection>
   <refsection>
     <title>Remark</title>
-    <para>This function applies, with identical rules to <link
-    linkend="sparse">sparse matrices</link> and <link
-    linkend="hypermat">hypermatrices</link>.</para>
+    <para>
+                       This function applies, with identical rules to
+                       <link linkend="sparse">sparse matrices</link>
+                       and
+                       <link linkend="hypermat">hypermatrices</link>
+                       .
+               </para>
   </refsection>
-
   <refsection>
     <title>Examples</title>
-
     <programlisting role="example"><![CDATA[ 
 A=[1,2;3,4];
 cumsum(A)
@@ -182,12 +254,15 @@ cumsum(B) //evaluation in float
 cumsum(B,"native") //similar to or(B)
  ]]></programlisting>
   </refsection>
-
   <refsection role="see also">
-<title>See Also</title>
+    <title>See Also</title>
     <simplelist type="inline">
-      <member><link linkend="sum">sum</link></member>
-      <member><link linkend="cumprod">cumprod</link></member>
+      <member>
+        <link linkend="sum">sum</link>
+      </member>
+      <member>
+        <link linkend="cumprod">cumprod</link>
+      </member>
     </simplelist>
   </refsection>
 </refentry>