help pages: toeplitz overhauled. diag, sparse, speye improved 24/19624/4
Samuel GOUGEON [Sun, 17 Dec 2017 18:41:17 +0000 (19:41 +0100)]
 toeplitz() was poorly referenced as constructor of matrix with
 diagonal bands.
 diag() and toeplitz() were poorly referenced for sparse usages.

Change-Id: I07e7b5e350df1b52b5f0ba41ddb16ab3d899ccb8

18 files changed:
scilab/CHANGES.md
scilab/modules/elementary_functions/help/en_US/elementarymatrices/diag.xml
scilab/modules/elementary_functions/help/en_US/elementarymatrices/toeplitz.xml
scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/diag.xml
scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/toeplitz.xml
scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/diag.xml
scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/toeplitz.xml [deleted file]
scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/diag.xml
scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/toeplitz.xml [deleted file]
scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/diag.xml
scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/toeplitz.xml [deleted file]
scilab/modules/sparse/help/en_US/matrixmanip/speye.xml
scilab/modules/sparse/help/en_US/sparseconvert/sparse.xml
scilab/modules/sparse/help/fr_FR/matrixmanip/speye.xml
scilab/modules/sparse/help/ja_JP/matrixmanip/speye.xml
scilab/modules/sparse/help/ja_JP/sparseconvert/sparse.xml
scilab/modules/sparse/help/pt_BR/matrixmanip/speye.xml
scilab/modules/sparse/help/pt_BR/sparseconvert/sparse.xml

index 44835a8..d67165f 100644 (file)
@@ -229,11 +229,11 @@ Help pages:
   `printf`, `sprintf`, `iconvert`, `stdev`, `xlabel`, `and_op`, `or_op`, `permute`, `tree2code`, `%helps`,
   `scilab|scilex`, `flipdim`, `Matplot_properties`, `meshgrid`, `ismatrix`, `xget`, `xset`, `ieee`, `evstr`,
   `uigetfont`, `uigetdir`, `uigetfile`, `uiputfile`, `cat`, `makecell`, `xstring`, `norm`, `barhomogenize`,
-  `colordef`, `matrix`, `coffg`
+  `colordef`, `matrix`, `coffg`, `diag`, `speye`, `sparse`
 * rewritten: `consolebox`, `double`, `isoview`, `pixel_drawing_mode`, `householder`, `or`, `|,||`,
  `and`, `&,&&`, `format`, `type`, `typeof`, `brackets`, `setlanguage`, `sleep`, `isinf`, `unique`,
  `bitor`, `bitxor`, `bitand`, `macr2tree`, `geomean`, `clf`, `getPreferencesValue`, `gcd`, `isglobal`,
- `whereis`, `mode`, `%onprompt`
+ `whereis`, `mode`, `%onprompt`, `toeplitz`
 * reorganized:
   - `else`, `elseif`, `end`, `try`, `sciargs`, `global`, `halt`, `empty`, `power`, `numderivative`
   - `pixel_drawing_mode`, `show_window`, `twinkle`, `uigetcolor`, `winsid`, `xdel`, `xgrid`, `xname`, `xnumb`
index ce24ce2..d92c987 100644 (file)
  * along with this program.
  *
  -->
-<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" xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="en">
+<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"
+        xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="en">
     <refnamediv>
         <refname>diag</refname>
         <refpurpose>diagonal including or extracting</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>[y]=diag(vm, [k])</synopsis>
+        <synopsis>
+           y = diag(vm)
+           y = diag(vm, k)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Arguments</title>
@@ -70,8 +76,7 @@
             If <literal>vm</literal> is a sparse matrix
             <literal>diag(vm,k)</literal> returns a sparse matrix.
         </para>
-        <para>To construct a diagonal linear system, use
-            <literal>sysdiag</literal>.
+        <para>To construct a diagonal linear system, use <literal>sysdiag</literal>.
         </para>
         <para>
             Note that <literal>eye(A).*A</literal> returns a diagonal matrix
@@ -99,10 +104,19 @@ m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
         <title>See also</title>
         <simplelist type="inline">
             <member>
+                <link linkend="toeplitz">toeplitz</link>
+            </member>
+            <member>
+                <link linkend="eye">eye</link>
+            </member>
+            <member>
                 <link linkend="sysdiag">sysdiag</link>
             </member>
             <member>
-                <link linkend="sparse">sparse</link>
+                <link linkend="spec">spec</link>
+            </member>
+            <member>
+                <link linkend="bdiag">bdiag</link>
             </member>
         </simplelist>
     </refsection>
index 926abf2..c2d8f06 100644 (file)
@@ -2,6 +2,7 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
+ * Copyright (C) 2017 - Samuel GOUGEON
  *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * along with this program.
  *
  -->
-<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" xmlns:scilab="http://www.scilab.org" xml:id="toeplitz" xml:lang="en">
+<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"
+    xmlns:scilab="http://www.scilab.org" xml:id="toeplitz" xml:lang="en">
     <refnamediv>
         <refname>toeplitz</refname>
-        <refpurpose>Toeplitz matrix</refpurpose>
+        <refpurpose>Toeplitz matrix (chosen constant diagonal bands)</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>A=toeplitz(c [,r])</synopsis>
+        <synopsis>
+            A = toeplitz(c)
+            A = toeplitz(c, r)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Arguments</title>
         <variablelist>
             <varlistentry>
-                <term>a,c,r</term>
+                <term>c, r</term>
                 <listitem>
-                    <para>constant, polynomial or string matrices</para>
+                    <para>
+                        vectors or matrices of booleans, numbers, polynomials, rationals, or texts,
+                        dense or sparse encoded (booleans or numbers).
+                    </para>
+                    <para>
+                        <varname>c</varname> are values expected on the first column and subsequent
+                        lower diagonals. <varname>r</varname> are values expected on the first row
+                        and subsequent upper diagonals.
+                    </para>
+                    <para>
+                        If both <literal>c</literal> and <literal>r</literal> are provided,
+                        <literal>c(1)==r(1)</literal> is required.
+                    </para>
+                    <para>
+                        The types of <literal>c</literal> and <literal>r</literal> must be compatible
+                        w.r.t. the concatenation.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>A</term>
+                <listitem>
+                    <para>
+                     Matrix of the type of <varname>c</varname> and <varname>r</varname>
+                    (with usual types priorities)
+                    </para>
+                    <para>
+                        <varname>A</varname> is of size <literal>[size(c,"*"), size(c,"*")]</literal>
+                        or <literal>[size(c,"*"), size(r,"*")]</literal>.
+                    </para>
+                    <para>
+                        <varname>A</varname> is sparse encoded as soon as either <varname>c</varname>
+                        or <varname>r</varname> or both are sparse encoded.
+                    </para>
                 </listitem>
             </varlistentry>
         </variablelist>
     <refsection>
         <title>Description</title>
         <para>
-            <literal>A=toeplitz(c [,r])</literal> returns the Toeplitz matrix whose first row is <literal>r</literal>
-            and first column is <literal>c</literal>. <literal>c(1)</literal> must be
-            equal to <literal>r(1)</literal>. <literal>toeplitz(c)</literal> returns
-            the symmetric Toeplitz matrix.
+            <literal>A=toeplitz(c, r)</literal> returns the Toeplitz matrix whose first row is
+            <literal>r</literal> and first column is <literal>c</literal>.
+            <literal>toeplitz(c)</literal> returns the symmetric Toeplitz matrix.
         </para>
     </refsection>
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-A=toeplitz(1:5);
+toeplitz(0:3)
+ ]]></programlisting>
+    <screen><![CDATA[
+--> toeplitz(0:3)
+ ans  =
+   0.   1.   2.   3.
+   1.   0.   1.   2.
+   2.   1.   0.   1.
+   3.   2.   1.   0.
+]]></screen>
+    <para/>
+    <programlisting role="example"><![CDATA[
+toeplitz([0 1 0 0 ], [0 -1 -2 0 0 0])
+ ]]></programlisting>
+    <screen><![CDATA[
+--> toeplitz([0 1 0 0 ], [0 -1 -2 0 0 0])
+ ans  =
+   0.  -1.  -2.   0.   0.   0.
+   1.   0.  -1.  -2.   0.   0.
+   0.   1.   0.  -1.  -2.   0.
+   0.   0.   1.   0.  -1.  -2.
+]]></screen>
+    <para/>
+    <para>With sparse encoded arrays: </para>
+    <programlisting role="example"><![CDATA[
+v = [0 1:2 0 0];
+S = toeplitz(v, sparse(-v));
+typeof(S)
+full(S)
+ ]]></programlisting>
+    <screen><![CDATA[
+--> typeof(S)
+ ans  =
+ sparse
 
-T=toeplitz(1:5,1:2:7);T1=[1 3 5 7;2 1 3 5;3 2 1 3;4 3 2 1;5 4 3 2];
-T-T1
+--> full(S)
+ ans  =
+   0.  -1.  -2.   0.   0.
+   1.   0.  -1.  -2.   0.
+   2.   1.   0.  -1.  -2.
+   0.   2.   1.   0.  -1.
+   0.   0.   2.   1.   0.
+]]></screen>
+    <para/>
+    <para>With texts: </para>
+    <programlisting role="example"><![CDATA[
+toeplitz(["-" "A" "B" "C"],["-" "a" "b" "c" "d" "e"])
+ ]]></programlisting>
+    <screen><![CDATA[
+--> toeplitz(["-" "A" "B" "C"],["-" "a" "b" "c" "d" "e"])
+ ans  =
+!-  a  b  c  d  e  !
+!A  -  a  b  c  d  !
+!B  A  -  a  b  c  !
+!C  B  A  -  a  b  !
+]]></screen>
+    <para/>
+    <para>With polynomials: </para>
+    <programlisting role="example"><![CDATA[
+toeplitz([%s %s^2 %s^3], [%s 1:4])
+ ]]></programlisting>
+    <screen><![CDATA[
+--> toeplitz([%s %s^2 %s^3], [%s 1:4])
+ ans  =
+   s    1    2   3   4
 
-s=poly(0,'s');
-t=toeplitz([s,s+1,s^2,1-s]);
-t1=[s,1+s,s*s,1-s;1+s,s,1+s,s*s;s*s,1+s,s,1+s;1-s,s*s,1+s,s]
-t-t1
+    2
+   s    s    1   2   3
 
-t=toeplitz(['1','2','3','4']);
-t1=['1','2','3','4';'2','1','2','3';'3','2','1','2';'4','3','2','1']
- ]]></programlisting>
+    3    2
+   s    s    s   1   2
+]]></screen>
+    <para/>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="matrix">matrix</link>
+                <link linkend="diag">diag</link>
+            </member>
+            <member>
+                <link linkend="eye">eye</link>
             </member>
             <member>
                 <link linkend="testmatrix">testmatrix</link>
index 5cf2308..e330e79 100644 (file)
@@ -1,14 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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" xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="fr">
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA
+ *
+ * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ *
+ * This file is hereby licensed under the terms of the GNU GPL v2.0,
+ * pursuant to article 5.3.4 of the CeCILL v.2.1.
+ * This file was originally licensed under the terms of the CeCILL v2.1,
+ * and continues to be available under such terms.
+ * For more information, see the COPYING file which you should have received
+ * along with this program.
+ *
+ -->
+<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"
+          xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="fr">
     <refnamediv>
         <refname>diag</refname>
-        <refpurpose>extraction de diagonale ou construction d'une matrice à partir
-            d'une diagonale.
+        <refpurpose>extraction de diagonale ou construction d'une matrice avec un vecteur en diagonal
         </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Séquence d'appel</title>
-        <synopsis>[y]=diag(vm, [k])</synopsis>
+        <synopsis>
+           y = diag(vm)
+           y = diag(vm, k)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Paramètres</title>
@@ -89,10 +108,19 @@ m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
         <title>Voir aussi</title>
         <simplelist type="inline">
             <member>
+                <link linkend="toeplitz">toeplitz</link>
+            </member>
+            <member>
+                <link linkend="eye">eye</link>
+            </member>
+            <member>
                 <link linkend="sysdiag">sysdiag</link>
             </member>
             <member>
-                <link linkend="sparse">sparse</link>
+                <link linkend="spec">spec</link>
+            </member>
+            <member>
+                <link linkend="bdiag">bdiag</link>
             </member>
         </simplelist>
     </refsection>
index 714f550..b5b0e3e 100644 (file)
@@ -1,21 +1,73 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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" xmlns:scilab="http://www.scilab.org" xml:id="toeplitz" xml:lang="fr">
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA
+ * Copyright (C) 2017 - Samuel GOUGEON
+ *
+ * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ *
+ * This file is hereby licensed under the terms of the GNU GPL v2.0,
+ * pursuant to article 5.3.4 of the CeCILL v.2.1.
+ * This file was originally licensed under the terms of the CeCILL v2.1,
+ * and continues to be available under such terms.
+ * For more information, see the COPYING file which you should have received
+ * along with this program.
+ *
+ -->
+<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"
+        xmlns:scilab="http://www.scilab.org" xml:id="toeplitz" xml:lang="fr">
     <refnamediv>
         <refname>toeplitz</refname>
-        <refpurpose>matrice de Toeplitz</refpurpose>
+        <refpurpose>matrice de Toeplitz, à bandes diagonales constantes choisies</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Séquence d'appel</title>
-        <synopsis>A=toeplitz(c [,r])</synopsis>
+        <synopsis>
+            A = toeplitz(c)
+            A = toeplitz(c, r)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Paramètres</title>
         <variablelist>
             <varlistentry>
-                <term>a,c,r</term>
+                <term>c, r</term>
                 <listitem>
-                    <para>matrice complexe, réelle, polynomiale ou de chaînes de
-                        caractères.
+                    <para>
+                        vecteurs ou matrices de booléens, nombres, polynômes, fractions rationelles,
+                        ou textes, denses ou creux (booléens ou nombres).
+                    </para>
+                    <para>
+                        <varname>c</varname> fournit les valeurs attendues sur la 1ère colonne et
+                        le long des diagonales inférieures. <varname>r</varname> fournit les valeurs
+                        attendues sur la 1ère ligne et le long des diagonales supérieures.
+                    </para>
+                    <para>
+                        Si les deux <literal>c</literal> et <literal>r</literal> sont fournis,
+                        il faut que <literal>c(1)==r(1)</literal>.
+                    </para>
+                    <para>
+                        Les types de <varname>c</varname> et <varname>r</varname> doivent être
+                        compatibles par concaténation.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>A</term>
+                <listitem>
+                    <para>
+                     Matrice du type de <varname>c</varname> et <varname>r</varname>
+                    (avec les priorités habituelles pour le typage).
+                    </para>
+                    <para>
+                        <varname>A</varname> est de taille <literal>[size(c,"*"), size(c,"*")]</literal>
+                        ou <literal>[size(c,"*"), size(r,"*")]</literal>.
+                    </para>
+                    <para>
+                        <varname>A</varname> est encodée creuse si <varname>c</varname> ou
+                        <varname>r</varname> ou les deux sont encodées creuses.
                     </para>
                 </listitem>
             </varlistentry>
     </refsection>
     <refsection>
         <title>Description</title>
-        <para>Renvoie la matrice de Toeplitz dont la première ligne est
+        <para>
+            Renvoie la matrice de Toeplitz dont la première ligne est
             <literal>r</literal> et la première colonne est <literal>c</literal>.
-            <literal>c(1)</literal> doit être égal à <literal>r(1)</literal>.
-            <literal>toeplitz(c)</literal> renvoie la matrice de Toeplitz
-            symétrique.
+            <literal>toeplitz(c)</literal> renvoie la matrice de Toeplitz symétrique.
         </para>
     </refsection>
     <refsection>
         <title>Exemples</title>
         <programlisting role="example"><![CDATA[
-A=toeplitz(1:5);
+toeplitz(0:3)
+ ]]></programlisting>
+    <screen><![CDATA[
+--> toeplitz(0:3)
+ ans  =
+   0.   1.   2.   3.
+   1.   0.   1.   2.
+   2.   1.   0.   1.
+   3.   2.   1.   0.
+]]></screen>
+    <para/>
+    <programlisting role="example"><![CDATA[
+toeplitz([0 1 0 0 ], [0 -1 -2 0 0 0])
+ ]]></programlisting>
+    <screen><![CDATA[
+--> toeplitz([0 1 0 0 ], [0 -1 -2 0 0 0])
+ ans  =
+   0.  -1.  -2.   0.   0.   0.
+   1.   0.  -1.  -2.   0.   0.
+   0.   1.   0.  -1.  -2.   0.
+   0.   0.   1.   0.  -1.  -2.
+]]></screen>
+    <para/>
+    <para>Avec des tableaux encodés creux : </para>
+    <programlisting role="example"><![CDATA[
+v = [0 1:2 0 0];
+S = toeplitz(v, sparse(-v));
+typeof(S)
+full(S)
+ ]]></programlisting>
+    <screen><![CDATA[
+--> typeof(S)
+ ans  =
+ sparse
 
-T=toeplitz(1:5,1:2:7);T1=[1 3 5 7;2 1 3 5;3 2 1 3;4 3 2 1;5 4 3 2];
-T-T1
+--> full(S)
+ ans  =
+   0.  -1.  -2.   0.   0.
+   1.   0.  -1.  -2.   0.
+   2.   1.   0.  -1.  -2.
+   0.   2.   1.   0.  -1.
+   0.   0.   2.   1.   0.
+]]></screen>
+    <para/>
+    <para>Avec du texte : </para>
+    <programlisting role="example"><![CDATA[
+toeplitz(["-" "A" "B" "C"],["-" "a" "b" "c" "d" "e"])
+ ]]></programlisting>
+    <screen><![CDATA[
+--> toeplitz(["-" "A" "B" "C"],["-" "a" "b" "c" "d" "e"])
+ ans  =
+!-  a  b  c  d  e  !
+!A  -  a  b  c  d  !
+!B  A  -  a  b  c  !
+!C  B  A  -  a  b  !
+]]></screen>
+    <para/>
+    <para>Avec des polynômes : </para>
+    <programlisting role="example"><![CDATA[
+toeplitz([%s %s^2 %s^3], [%s 1:4])
+ ]]></programlisting>
+    <screen><![CDATA[
+--> toeplitz([%s %s^2 %s^3], [%s 1:4])
+ ans  =
+   s    1    2   3   4
 
-s=poly(0,'s');
-t=toeplitz([s,s+1,s^2,1-s]);
-t1=[s,1+s,s*s,1-s;1+s,s,1+s,s*s;s*s,1+s,s,1+s;1-s,s*s,1+s,s]
-t-t1
+    2
+   s    s    1   2   3
 
-t=toeplitz(['1','2','3','4']);
-t1=['1','2','3','4';'2','1','2','3';'3','2','1','2';'4','3','2','1']
- ]]></programlisting>
+    3    2
+   s    s    s   1   2
+]]></screen>
+    <para/>
     </refsection>
     <refsection role="see also">
         <title>Voir aussi</title>
         <simplelist type="inline">
             <member>
-                <link linkend="matrix">matrix</link>
+                <link linkend="diag">diag</link>
+            </member>
+            <member>
+                <link linkend="eye">eye</link>
+            </member>
+            <member>
+                <link linkend="testmatrix">testmatrix</link>
             </member>
         </simplelist>
     </refsection>
index 34d0b2c..c05e0c7 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * along with this program.
  *
  -->
-
-<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" xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="ja">
-
+<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"
+          xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="ja">
     <refnamediv>
-
         <refname>diag</refname>
-
         <refpurpose>対角行列の構築または展開</refpurpose>
-
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
-        <synopsis>[y]=diag(vm, [k])</synopsis>
-
+        <synopsis>
+            y = diag(vm)
+            y = diag(vm, k)
+        </synopsis>
     </refsynopsisdiv>
-
     <refsection>
-
         <title>引数</title>
-
         <variablelist>
-
             <varlistentry>
-
                 <term>vm</term>
-
                 <listitem>
-
                     <para>ベクトルまたは行列 (完全または疎行列)</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>k</term>
-
                 <listitem>
-
                     <para>整数 (デフォルト値 0)</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>y</term>
-
                 <listitem>
-
                     <para>ベクトルまたは行列</para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
         <para>
-
             n次(行または列) ベクトル<literal>vm</literal> に関して,
-
             <literal>diag(vm)</literal> は<literal>vm</literal>のエントリを
-
             主対角項とする対角行列を返します.
-
         </para>
-
         <para>
-
             <literal>diag(vm,k)</literal> は,<literal>vm</literal>の
-
             エントリを k番目の対角項とする
-
             <literal>(n+abs(k))x(n+abs(k))</literal>行列を返します.
-
             <literal>k=0</literal>は主対角,
-
             <literal>k&gt;0</literal> は上方対角,
-
             <literal>k&lt;0</literal> は下方対角です.
-
         </para>
-
         <para>
-
             <literal>vm</literal>が行列の場合, <literal>diag(vm,k)</literal> は
-
             <literal>vm</literal>の k番目の対角項のエントリからなる
-
             列ベクトルとなります.
-
             <literal>diag(vm)</literal> は<literal>vm</literal>の主対角項です.
-
             <literal>diag(diag(x))</literal> は対角行列です.
-
         </para>
-
         <para>
-
             <literal>vm</literal> が疎行列の場合,
-
             <literal>diag(vm,k)</literal> は疎行列を返します.
-
         </para>
-
         <para>対角線形システムを構築するには,
-
             <literal>sysdiag</literal>を使用してください.
-
         </para>
-
         <para>
-
             <literal>eye(A).*A</literal> は
-
             <literal>A</literal>の対角エントリからなる対角行列を
-
             返すことに注意してください.
-
             これは,任意の行列(定数,多項式,有理数,状態空間線形システム,...)
-
             で有効です.
-
         </para>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
 diag([1,2])
+
 A=[1,2;3,4];
 diag(A)  // main diagonal
 diag(A,1)
+
 diag(sparse(1:10))  // sparse diagonal matrix
+
 // form a tridiagonal matrix of size 2*m+1
 m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
  ]]></programlisting>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
+                <link linkend="toeplitz">toeplitz</link>
+            </member>
+            <member>
+                <link linkend="eye">eye</link>
+            </member>
+            <member>
                 <link linkend="sysdiag">sysdiag</link>
-
             </member>
-
             <member>
-
-                <link linkend="sparse">sparse</link>
-
+                <link linkend="spec">spec</link>
+            </member>
+            <member>
+                <link linkend="bdiag">bdiag</link>
             </member>
-
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+</refentry>
\ No newline at end of file
diff --git a/scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/toeplitz.xml b/scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/toeplitz.xml
deleted file mode 100644 (file)
index 03c1254..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- *
- -->
-
-<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" xmlns:scilab="http://www.scilab.org" xml:id="toeplitz" xml:lang="ja">
-
-    <refnamediv>
-
-        <refname>toeplitz</refname>
-
-        <refpurpose>toeplitz行列</refpurpose>
-
-    </refnamediv>
-
-    <refsynopsisdiv>
-
-        <title>呼び出し手順</title>
-
-        <synopsis>A=toeplitz(c [,r])</synopsis>
-
-    </refsynopsisdiv>
-
-    <refsection>
-
-        <title>引数</title>
-
-        <variablelist>
-
-            <varlistentry>
-
-                <term>a,c,r</term>
-
-                <listitem>
-
-                    <para>定数, 多項式 または文字列行列</para>
-
-                </listitem>
-
-            </varlistentry>
-
-        </variablelist>
-
-    </refsection>
-
-    <refsection>
-
-        <title>説明</title>
-
-        <para>
-
-            最初の行を<literal>r</literal>,
-
-            最初の列を<literal>c</literal>とするToeplitz行列を返します.
-
-            <literal>c(1)</literal> は<literal>r(1)</literal>に等しい
-
-            必要があります.
-
-            <literal>toeplitz(c)</literal> は対称Toeplitz行列を返します.
-
-        </para>
-
-    </refsection>
-
-    <refsection>
-
-        <title>例</title>
-
-        <programlisting role="example"><![CDATA[
-A=toeplitz(1:5);
-T=toeplitz(1:5,1:2:7);T1=[1 3 5 7;2 1 3 5;3 2 1 3;4 3 2 1;5 4 3 2];
-T-T1
-s=poly(0,'s');
-t=toeplitz([s,s+1,s^2,1-s]);
-t1=[s,1+s,s*s,1-s;1+s,s,1+s,s*s;s*s,1+s,s,1+s;1-s,s*s,1+s,s]
-t-t1
-t=toeplitz(['1','2','3','4']);
-t1=['1','2','3','4';'2','1','2','3';'3','2','1','2';'4','3','2','1']
- ]]></programlisting>
-
-    </refsection>
-
-    <refsection role="see also">
-
-        <title>参照</title>
-
-        <simplelist type="inline">
-
-            <member>
-
-                <link linkend="matrix">matrix</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="testmatrix">testmatrix</link>
-
-            </member>
-
-        </simplelist>
-
-    </refsection>
-
-</refentry>
-
index 14b3117..4169ac5 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * along with this program.
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="pt">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+          xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="pt">
     <refnamediv>
         <refname>diag</refname>
-        <refpurpose>inclusão ou extração diagonal</refpurpose>
+        <refpurpose>inclusão ou extração diagonal</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>[y]=diag(vm, [k])</synopsis>
+        <title>Seqüência de Chamamento</title>
+        <synopsis>
+           y = diag(vm)
+           y = diag(vm, k)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Parâmetros</title>
+        <title>Parâmetros</title>
         <variablelist>
             <varlistentry>
                 <term>vm</term>
@@ -34,7 +40,7 @@
             <varlistentry>
                 <term>k</term>
                 <listitem>
-                    <para>inteiro (o valor padrão é 0)</para>
+                    <para>inteiro (o valor padrão é 0)</para>
                 </listitem>
             </varlistentry>
             <varlistentry>
         </variablelist>
     </refsection>
     <refsection>
-        <title>Descrição</title>
+        <title>Descrição</title>
         <para>
             Para um n-vetor (linha ou coluna) <literal>vm</literal> ,
             <literal>diag(vm)</literal> retorna uma matriz diagonal com entradas de
             <literal>vm</literal> ao longo da diagonal principal.
         </para>
         <para>
-            <literal>diag(vm,k)</literal> é uma matriz
+            <literal>diag(vm,k)</literal> é uma matriz
             <literal>(n+abs(k))x(n+abs(k))</literal> com entradas de
-            <literal>vm</literal> ao longo da k-ésima diagonal. <literal>k=0</literal>
-            é a diagonal principal, <literal>k&gt;0</literal> são as diagonais
-            superiores e <literal>k&lt;0</literal> são as diagonais inferiores.
+            <literal>vm</literal> ao longo da k-ésima diagonal. <literal>k=0</literal>
+            é a diagonal principal, <literal>k&gt;0</literal> são as diagonais
+            superiores e <literal>k&lt;0</literal> são as diagonais inferiores.
         </para>
         <para>
             Para uma matriz <literal>vm</literal>, <literal>diag(vm,k)</literal>
-            é o vetor coluna feito das entradas da k-ésima diagonal de
-            <literal>vm</literal>. <literal>diag(vm)</literal> é a diagonal principal
-            de <literal>vm</literal>. <literal>diag(diag(x))</literal> é a matriz
+            é o vetor coluna feito das entradas da k-ésima diagonal de
+            <literal>vm</literal>. <literal>diag(vm)</literal> é a diagonal principal
+            de <literal>vm</literal>. <literal>diag(diag(x))</literal> é a matriz
             diagonal.
         </para>
         <para>
-            Se <literal>vm</literal> é uma matriz esparsa,
+            Se <literal>vm</literal> é uma matriz esparsa,
             <literal>diag(vm,k)</literal> retorna uma matriz esparsa.
         </para>
         <para>Para construir um sistema linear diagonal, use
@@ -75,9 +81,9 @@
         </para>
         <para>
             Perceba que <literal>eye(A).*A</literal> retorna uma matriz diagonal
-            feita das entradas diagonais de <literal>A</literal>. Isto é válido para
-            qualquer matriz (constante, de polinômios, de razões de polinômios,
-            sistema linear em espaço de estados,...).
+            feita das entradas diagonais de <literal>A</literal>. Isto é válido para
+            qualquer matriz (constante, de polinômios, de razões de polinômios,
+            sistema linear em espaço de estados,...).
         </para>
     </refsection>
     <refsection>
@@ -96,13 +102,22 @@ m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
-        <title>Ver Também</title>
+        <title>Ver Também</title>
         <simplelist type="inline">
             <member>
+                <link linkend="toeplitz">toeplitz</link>
+            </member>
+            <member>
+                <link linkend="eye">eye</link>
+            </member>
+            <member>
                 <link linkend="sysdiag">sysdiag</link>
             </member>
             <member>
-                <link linkend="sparse">sparse</link>
+                <link linkend="spec">spec</link>
+            </member>
+            <member>
+                <link linkend="bdiag">bdiag</link>
             </member>
         </simplelist>
     </refsection>
diff --git a/scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/toeplitz.xml b/scilab/modules/elementary_functions/help/pt_BR/elementarymatrices/toeplitz.xml
deleted file mode 100644 (file)
index 0cb09ee..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="toeplitz" xml:lang="pt">
-    <refnamediv>
-        <refname>toeplitz</refname>
-        <refpurpose>matriz de Toeplitz</refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>A=toeplitz(c [,r])</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Parâmetros</title>
-        <variablelist>
-            <varlistentry>
-                <term>a,c,r</term>
-                <listitem>
-                    <para>matrizes de constantes, polinômios ou strings</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Descrição</title>
-        <para>Retorna a matriz de Toeplitz cuja primeira linha é
-            <literal>r</literal> e a primeira coluna é <literal>c</literal>.
-            <literal>c(1)</literal> deve ser igual a <literal>r(1)</literal>.
-            <literal>toeplitz(c)</literal> retorna a matriz de Toeplitz
-            simétrica.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Exemplos</title>
-        <programlisting role="example"><![CDATA[
-A=toeplitz(1:5);
-
-T=toeplitz(1:5,1:2:7);T1=[1 3 5 7;2 1 3 5;3 2 1 3;4 3 2 1;5 4 3 2];
-T-T1
-
-s=poly(0,'s');
-t=toeplitz([s,s+1,s^2,1-s]);
-t1=[s,1+s,s*s,1-s;1+s,s,1+s,s*s;s*s,1+s,s,1+s;1-s,s*s,1+s,s]
-t-t1
-
-t=toeplitz(['1','2','3','4']);
-t1=['1','2','3','4';'2','1','2','3';'3','2','1','2';'4','3','2','1']
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Ver Também</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="matrix">matrix</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
index fe17ced..d0b4215 100644 (file)
  * along with this program.
  *
  -->
-<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" xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="ru">
+<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"
+          xmlns:scilab="http://www.scilab.org" xml:id="diag" xml:lang="ru">
     <refnamediv>
         <refname>diag</refname>
         <refpurpose>включение или исключение диагонали</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Синтаксис</title>
-        <synopsis>[y]=diag(vm, [k])</synopsis>
+        <synopsis>
+           y = diag(vm)
+           y = diag(vm, k)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Аргументы</title>
@@ -88,10 +94,19 @@ m=5;diag(-m:m) +  diag(ones(2*m,1),1) +diag(ones(2*m,1),-1)
         <title>Смотрите также</title>
         <simplelist type="inline">
             <member>
+                <link linkend="toeplitz">toeplitz</link>
+            </member>
+            <member>
+                <link linkend="eye">eye</link>
+            </member>
+            <member>
                 <link linkend="sysdiag">sysdiag</link>
             </member>
             <member>
-                <link linkend="sparse">sparse</link>
+                <link linkend="spec">spec</link>
+            </member>
+            <member>
+                <link linkend="bdiag">bdiag</link>
             </member>
         </simplelist>
     </refsection>
diff --git a/scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/toeplitz.xml b/scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/toeplitz.xml
deleted file mode 100644 (file)
index 5f6f099..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- *
- -->
-<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" xmlns:scilab="http://www.scilab.org" xml:id="toeplitz" xml:lang="ru">
-    <refnamediv>
-        <refname>toeplitz</refname>
-        <refpurpose>Тёплицева матрица</refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Синтаксис</title>
-        <synopsis>A=toeplitz(c [,r])</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Аргументы</title>
-        <variablelist>
-            <varlistentry>
-                <term>a,c,r</term>
-                <listitem>
-                    <para>
-                        матрицы констант (constant), многочленов (polynomial) или строк (string)
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Описание</title>
-        <para>
-            <literal>A=toeplitz(c [,r])</literal> возвращает Тёплицеву матрицу, чья первая строка <literal>r</literal>, а первый столбец <literal>c</literal>. <literal>c(1)</literal>
-            должет быть равным <literal>r(1)</literal>. <literal>toeplitz(c)</literal> возвращает симметричную Тёплицеву матрицу.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Примеры</title>
-        <programlisting role="example"><![CDATA[
-A=toeplitz(1:5);
-
-T=toeplitz(1:5,1:2:7);T1=[1 3 5 7;2 1 3 5;3 2 1 3;4 3 2 1;5 4 3 2];
-T-T1
-
-s=poly(0,'s');
-t=toeplitz([s,s+1,s^2,1-s]);
-t1=[s,1+s,s*s,1-s;1+s,s,1+s,s*s;s*s,1+s,s,1+s;1-s,s*s,1+s,s]
-t-t1
-
-t=toeplitz(['1','2','3','4']);
-t1=['1','2','3','4';'2','1','2','3';'3','2','1','2';'4','3','2','1']
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Смотрите также</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="matrix">matrix</link>
-            </member>
-            <member>
-                <link linkend="testmatrix">testmatrix</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
index e8a1552..cc3592d 100644 (file)
  * along with this program.
  *
  -->
-<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" xmlns:scilab="http://www.scilab.org" xml:id="speye" xml:lang="en">
+<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"
+        xmlns:scilab="http://www.scilab.org" xml:id="speye" xml:lang="en">
     <refnamediv>
         <refname>speye</refname>
         <refpurpose>sparse identity matrix</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>Isp=speye(nrows,ncols)
-            Isp=speye(A)
+        <synopsis>
+            Isp = speye(A)
+            Isp = speye(nrows, ncols)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
         <para>
             <literal>Isp=speye(A)</literal> returns a sparse identity matrix
             with same dimensions as <literal>A</literal>. If
-            <literal>[m,n]=size(A)</literal>, <literal>speye(m,n)</literal> and
-            <literal>speye(A)</literal> are equivalent. In particular
-            <literal>speye(3)</literal> is not equivalent to
-            <literal>speye(3,3)</literal>.
+            <literal>[m,n]=size(A)</literal>, <literal>speye(A)</literal> is equal to
+            <literal>speye(m,n)</literal>.
+            <warning>
+                Hence, <literal>speye(3)</literal> is equal to <literal>speye(1,1)</literal>, NOT
+                to <literal>speye(3,3)</literal>.
+            </warning>
         </para>
     </refsection>
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-eye(3,3)-full(speye(3,3))
+eye(3,3) - full(speye(3,3))
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
@@ -89,6 +95,12 @@ eye(3,3)-full(speye(3,3))
                 <link linkend="eye">eye</link>
             </member>
             <member>
+                <link linkend="diag">diag</link>
+            </member>
+            <member>
+                <link linkend="toeplitz">toeplitz</link>
+            </member>
+            <member>
                 <link linkend="spzeros">spzeros</link>
             </member>
             <member>
index bb44224..3243824 100644 (file)
  * along with this program.
  *
  -->
-<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="sparse">
+<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="sparse">
     <refnamediv>
         <refname>sparse</refname>
         <refpurpose>sparse matrix definition</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>sp=sparse(X)
-            sp=sparse(ij,v [,mn])
+        <synopsis>
+            sp = sparse(X)
+            sp = sparse(ij, v)
+            sp = sparse(ij, v, mn)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-sp=sparse([1,2;4,5;3,10],[1,2,3])
+sp = sparse([1,2;4,5;3,10],[1,2,3])
 size(sp)
-x=rand(2,2);abs(x)-full(abs(sparse(x)))
+
+x = rand(2,2);
+abs(x) - full(abs(sparse(x)))
+
 // sparse constructor taking a single dense matrix
 // removes the zeros.
-dense=[0., 1., 0., 0., 0.,
+dense = [0., 1., 0., 0., 0.,
 1., 0., 2., 0., 0.
 0., 0., 0., 0., 0.
 0., 0., 0., 0., -0.5];
-sp=sparse(dense)
+sp = sparse(dense)
+
 // complex matrices are also supported
-sp=sparse(dense*(1+2*%i))
+sp = sparse(dense*(1+2*%i))
+
 // for boolean matrices, the boolean sparse matrix
 // only stores true values (and removes false values).
-dense=[%F, %F, %T, %F, %F
+dense = [%F, %F, %T, %F, %F
 %T, %F, %F, %F, %F
 %F, %F, %F, %F, %F
 %F, %F, %F, %F, %T];
-sp=sparse(dense)
-
- ]]></programlisting>
+sp = sparse(dense)
+]]></programlisting>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
@@ -139,7 +148,10 @@ sp=sparse(dense)
                 <link linkend="speye">speye</link>
             </member>
             <member>
-                <link linkend="lufact">lufact</link>
+                <link linkend="diag">diag</link>
+            </member>
+            <member>
+                <link linkend="toeplitz">toeplitz</link>
             </member>
         </simplelist>
     </refsection>
index ed5002c..66b3a09 100644 (file)
@@ -1,13 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<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" xmlns:scilab="http://www.scilab.org" xml:id="speye" xml:lang="fr">
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA
+ *
+ * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ *
+ * This file is hereby licensed under the terms of the GNU GPL v2.0,
+ * pursuant to article 5.3.4 of the CeCILL v.2.1.
+ * This file was originally licensed under the terms of the CeCILL v2.1,
+ * and continues to be available under such terms.
+ * For more information, see the COPYING file which you should have received
+ * along with this program.
+ *
+ -->
+<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"
+        xmlns:scilab="http://www.scilab.org" xml:id="speye" xml:lang="fr">
     <refnamediv>
         <refname>speye</refname>
         <refpurpose>matrice identité creuse</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Séquence d'appel</title>
-        <synopsis>Isp=speye(nrows,ncols)
-            Isp=speye(A)
+        <synopsis>
+            Isp = speye(A)
+            Isp = speye(nrows, ncols)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
         <para>
             <literal>Isp=speye(A)</literal> renvoie une matrice identité creuse
             de même taille que <literal>A</literal>. Si
-            <literal>[m,n]=size(A)</literal>, les commandes
-            <literal>speye(m,n)</literal> et <literal>speye(A)</literal> sont
-            équivalentes. En particulier <literal>speye(3)</literal> n'est pas
-            équivalent à <literal>speye(3,3)</literal>.
+            <literal>[m,n]=size(A)</literal>, <literal>speye(A)</literal> et
+            <literal>speye(m,n)</literal> sont équivalentes.
+            <warning>
+                En particulier, <literal>speye(3)</literal> est équivalent à
+                <literal>speye(1,1)</literal>, NON à <literal>speye(3,3)</literal>.
+            </warning>
         </para>
     </refsection>
     <refsection>
         <title>Exemples</title>
         <programlisting role="example"><![CDATA[
-eye(3,3)-full(speye(3,3))
+eye(3,3) - full(speye(3,3))
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
@@ -74,6 +94,12 @@ eye(3,3)-full(speye(3,3))
                 <link linkend="eye">eye</link>
             </member>
             <member>
+                <link linkend="diag">diag</link>
+            </member>
+            <member>
+                <link linkend="toeplitz">toeplitz</link>
+            </member>
+            <member>
                 <link linkend="spzeros">spzeros</link>
             </member>
             <member>
index 7e2a02e..1aefee4 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * along with this program.
  *
  -->
-
-<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" xmlns:scilab="http://www.scilab.org" xml:id="speye" xml:lang="ja">
-
+<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"
+        xmlns:scilab="http://www.scilab.org" xml:id="speye" xml:lang="ja">
     <refnamediv>
-
         <refname>speye</refname>
-
         <refpurpose>疎単位行列</refpurpose>
-
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
-        <synopsis>Isp=speye(nrows,ncols)
-
-            Isp=speye(A)
-
+        <synopsis>
+            Isp = speye(A)
+            Isp = speye(nrows, ncols)
         </synopsis>
-
     </refsynopsisdiv>
-
     <refsection>
-
         <title>引数</title>
-
         <variablelist>
-
             <varlistentry>
-
                 <term>nrows</term>
-
                 <listitem>
-
                     <para>整数 (行数)</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>ncols</term>
-
                 <listitem>
-
                     <para>整数 (列数)</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>A</term>
-
                 <listitem>
-
                     <para>疎行列</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>sp</term>
-
                 <listitem>
-
                     <para>疎単位行列</para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
         <para>
-
             <literal>Isp=speye(nrows,ncols)</literal> は,
-
             <literal>nrows</literal> 行,
-
             <literal>ncols</literal> 列の
-
             疎単位行列<literal>Isp</literal>を返します.
-
             (非正方行列は主対角項に1を有します).
-
         </para>
-
         <para>
-
             <literal>Isp=speye(A)</literal>は<literal>A</literal>と
-
             同じ次元の疎単位行列を返します.
-
             <literal>[m,n]=size(A)</literal>の場合, <literal>speye(m,n)</literal> および
-
-            <literal>speye(A)</literal>は等価です. なお,
-
-            <literal>speye(3)</literal> は
-
-            <literal>speye(3,3)</literal>と等価ではありません.
-
+            <literal>speye(A)</literal>は等価です.
+            <warning>
+                なお, <literal>speye(3)</literal> は <literal>speye(3,3)</literal>と等価ではありません.
+            </warning>
         </para>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
-eye(3,3)-full(speye(3,3))
+eye(3,3) - full(speye(3,3))
  ]]></programlisting>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="sparse">sparse</link>
-
             </member>
-
             <member>
-
                 <link linkend="full">full</link>
-
             </member>
-
             <member>
-
                 <link linkend="eye">eye</link>
-
             </member>
-
             <member>
-
+                <link linkend="diag">diag</link>
+            </member>
+            <member>
+                <link linkend="toeplitz">toeplitz</link>
+            </member>
+            <member>
                 <link linkend="spzeros">spzeros</link>
-
             </member>
-
             <member>
-
                 <link linkend="spones">spones</link>
-
             </member>
-
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+</refentry>
\ No newline at end of file
index 260d4d6..a827f31 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) XXXX-2008 - INRIA
  * along with this program.
  *
  -->
-
-<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="ja" xml:id="sparse">
-
+<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="ja" xml:id="sparse">
     <refnamediv>
-
         <refname>sparse</refname>
-
         <refpurpose>疎行列を定義</refpurpose>
-
     </refnamediv>
-
     <refsynopsisdiv>
-
         <title>呼び出し手順</title>
-
-        <synopsis>sp=sparse(X)
-
-            sp=sparse(ij,v [,mn])
-
+        <synopsis>
+            sp = sparse(X)
+            sp = sparse(ij, v)
+            sp = sparse(ij, v, mn)
         </synopsis>
-
     </refsynopsisdiv>
-
     <refsection>
-
         <title>引数</title>
-
         <variablelist>
-
             <varlistentry>
-
                 <term>X</term>
-
                 <listitem>
-
                     <para>実数または複素数の通常の(または疎)行列</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>ij</term>
-
                 <listitem>
-
                     <para>2列の整数行列 (非ゼロエントリのインデックス)</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>v</term>
-
                 <listitem>
-
                     <para>ベクトル</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>mn</term>
-
                 <listitem>
-
                     <para>2つのエントリ(行の次元, 列の次元c)を有する整数ベクトル</para>
-
                 </listitem>
-
             </varlistentry>
-
             <varlistentry>
-
                 <term>sp</term>
-
                 <listitem>
-
                     <para>疎行列</para>
-
                 </listitem>
-
             </varlistentry>
-
         </variablelist>
-
     </refsection>
-
     <refsection>
-
         <title>説明</title>
-
         <para>
-
             <literal>sparse</literal>は疎行列を作成するために使用されます.
-
             ゼロでないエントリのみが保存されます.
-
         </para>
-
         <para>
-
             <literal>sp = sparse(X)</literal>  は,
-
             0要素を除外することにより,通常の行列を疎行列に変換します.
-
             (<literal>X</literal>が既に疎行列の場合,
-
             <literal>sp</literal>は<literal>X</literal>となります).
-
         </para>
-
         <para>
-
             <literal>sp=sparse(ij,v [,mn])</literal>は,
-
             <literal>sp(ij(k,1),ij(k,2))=v(k)</literal>となる
-
             <literal>mn(1)</literal>行<literal>mn(2)</literal>列の疎行列
-
             を作成します.
-
             <literal>ij</literal> および <literal>v</literal>は列の次元が
-
             同じである必要があります.
-
             オプションの<literal>mn</literal>パラメータが指定されない場合,
-
             行列<literal>sp</literal>の次元は,それぞれ
-
             <literal>ij(:,1)</literal> および <literal>ij(:,2)</literal>の
-
             最大値となります.
-
         </para>
-
         <para>
-
             疎行列に関する操作(結合,加算,等,)は通常の行列と同じ構文により
-
             行ないます.
-
         </para>
-
         <para>
-
             基本的な関数(<literal>abs,maxi,sum,diag,...</literal>)は疎行列でも
-
             利用可能です.
-
         </para>
-
         <para>
-
             (通常の行列と疎行列の)混用も可能です.
-
             結果は処理に応じて通常または疎行列となります.
-
         </para>
-
         <para>
-
             注意 :
-
             同じ大きさの通常の行列を含む任意の演算は,
-
             引数(例: <literal>sp=sparse(d)</literal>),
-
             または,結果(例  <literal>d= sp + 1.</literal>) のどちら
-
             についても利便性のために提供されていますが,当然避けるべきです.
-
             更に,要素(<literal>sp(r,c)</literal>)へのランダムアクセス,
-
             特に挿入,は効率的ではありません.
-
             このため,性能面の制約があるアクセスでは,
-
             読込みアクセスは<link linkend="spget">spget</link>,
-
             書込みアクセスは<literal>sp=sparse(ij, v, mn)</literal>による
-
             バッチ処理により行う必要があります.
-
         </para>
-
     </refsection>
-
     <refsection>
-
         <title>例</title>
-
         <programlisting role="example"><![CDATA[
-sp=sparse([1,2;4,5;3,10],[1,2,3])
+sp = sparse([1,2;4,5;3,10],[1,2,3])
 size(sp)
-x=rand(2,2);abs(x)-full(abs(sparse(x)))
+
+x = rand(2,2);
+abs(x) - full(abs(sparse(x)))
+
 // sparse constructor taking a single dense matrix
 // removes the zeros.
-dense=[0., 1., 0., 0., 0.,
+dense = [0., 1., 0., 0., 0.,
 1., 0., 2., 0., 0.
 0., 0., 0., 0., 0.
 0., 0., 0., 0., -0.5];
-sp=sparse(dense)
+sp = sparse(dense)
+
 // complex matrices are also supported
-sp=sparse(dense*(1+2*%i))
+sp = sparse(dense*(1+2*%i))
+
 // for boolean matrices, the boolean sparse matrix
 // only stores true values (and removes false values).
-dense=[%F, %F, %T, %F, %F
+dense = [%F, %F, %T, %F, %F
 %T, %F, %F, %F, %F
 %F, %F, %F, %F, %F
 %F, %F, %F, %F, %T];
 sp=sparse(dense)
-
  ]]></programlisting>
-
     </refsection>
-
     <refsection role="see also">
-
         <title>参照</title>
-
         <simplelist type="inline">
-
             <member>
-
                 <link linkend="full">full</link>
-
             </member>
-
             <member>
-
                 <link linkend="spget">spget</link>
-
             </member>
-
             <member>
-
                 <link linkend="sprand">sprand</link>
-
             </member>
-
             <member>
-
                 <link linkend="speye">speye</link>
-
             </member>
-
             <member>
-
-                <link linkend="lufact">lufact</link>
-
+                <link linkend="diag">diag</link>
+            </member>
+            <member>
+                <link linkend="toeplitz">toeplitz</link>
             </member>
-
         </simplelist>
-
     </refsection>
-
-</refentry>
-
+</refentry>
\ No newline at end of file
index 3231030..19451bd 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * along with this program.
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="speye" xml:lang="pt">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml"
+        xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+        xmlns:scilab="http://www.scilab.org" xml:id="speye" xml:lang="pt">
     <refnamediv>
         <refname>speye</refname>
         <refpurpose>matriz identidade esparsa</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>Isp=speye(nrows,ncols)
-            Isp=speye(A)
+        <title>Seqüência de Chamamento</title>
+        <synopsis>
+            Isp = speye(A)
+            Isp = speye(nrows, ncols)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Parâmetros</title>
+        <title>Parâmetros</title>
         <variablelist>
             <varlistentry>
                 <term>nrows</term>
                 <listitem>
-                    <para>inteiro (número de linhas) </para>
+                    <para>inteiro (número de linhas) </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>ncols</term>
                 <listitem>
-                    <para>inteiro (número de colunas) </para>
+                    <para>inteiro (número de colunas) </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
         </variablelist>
     </refsection>
     <refsection>
-        <title>Descrição</title>
+        <title>Descrição</title>
         <para>
             <literal>Isp=speye(nrows,ncols)</literal> retorna uma matriz
             identidade esparsa <literal>Isp</literal> com <literal>nrows</literal>
             linhas e , <literal>ncols</literal> colunas (matrizes identidades
-            não-quadradas têm um número máximo de algarismos 1 na diagonal
+            não-quadradas têm um número máximo de algarismos 1 na diagonal
             principal).
         </para>
         <para>
             <literal>Isp=speye(A)</literal> retorna uma matriz identidade
-            esparsa com as mesmas dimensões de <literal>A</literal>.
+            esparsa com as mesmas dimensões de <literal>A</literal>.
             Se<literal>[m,n]=size(A)</literal>, <literal>speye(m,n)</literal> e
-            <literal>speye(A)</literal> são equivalentes. Em particular
-            <literal>speye(3)</literal> não é equivalente a
-            <literal>speye(3,3)</literal>.
+            <literal>speye(A)</literal> são equivalentes.
+            <warning>
+                Em particular <literal>speye(3)</literal> não é equivalente a <literal>speye(3,3)</literal>.
+            </warning>
         </para>
     </refsection>
     <refsection>
         <title>Exemplos</title>
         <programlisting role="example"><![CDATA[
-eye(3,3)-full(speye(3,3))
+eye(3,3) - full(speye(3,3))
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
-        <title>Ver Também</title>
+        <title>Ver Também</title>
         <simplelist type="inline">
             <member>
                 <link linkend="sparse">sparse</link>
@@ -90,6 +95,12 @@ eye(3,3)-full(speye(3,3))
                 <link linkend="eye">eye</link>
             </member>
             <member>
+                <link linkend="diag">diag</link>
+            </member>
+            <member>
+                <link linkend="toeplitz">toeplitz</link>
+            </member>
+            <member>
                 <link linkend="spzeros">spzeros</link>
             </member>
             <member>
index c6412ac..6f8987f 100644 (file)
  * along with this program.
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="sparse" xml:lang="pt">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+          xmlns:scilab="http://www.scilab.org" xml:id="sparse" xml:lang="pt">
     <refnamediv>
         <refname>sparse</refname>
         <refpurpose>definição de matriz esparsa</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Seqüência de Chamamento</title>
-        <synopsis>sp=sparse(X)
-            sp=sparse(ij,v [,mn])
+        <synopsis>
+            sp = sparse(X)
+            sp = sparse(ij, v)
+            sp = sparse(ij, v, mn)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
     <refsection>
         <title>Exemplos</title>
         <programlisting role="example"><![CDATA[
-sp=sparse([1,2;4,5;3,10],[1,2,3])
+sp = sparse([1,2;4,5;3,10],[1,2,3])
 size(sp)
-x=rand(2,2);abs(x)-full(abs(sparse(x)))
+
+x = rand(2,2);
+abs(x) - full(abs(sparse(x)))
+
+// sparse constructor taking a single dense matrix
+// removes the zeros.
+dense = [0., 1., 0., 0., 0.,
+1., 0., 2., 0., 0.
+0., 0., 0., 0., 0.
+0., 0., 0., 0., -0.5];
+sp = sparse(dense)
+
+// complex matrices are also supported
+sp = sparse(dense*(1+2*%i))
+
+// for boolean matrices, the boolean sparse matrix
+// only stores true values (and removes false values).
+dense = [%F, %F, %T, %F, %F
+%T, %F, %F, %F, %F
+%F, %F, %F, %F, %F
+%F, %F, %F, %F, %T];
+sp = sparse(dense)
  ]]></programlisting>
     </refsection>
     <refsection>
@@ -118,7 +144,10 @@ x=rand(2,2);abs(x)-full(abs(sparse(x)))
                 <link linkend="speye">speye</link>
             </member>
             <member>
-                <link linkend="lufact">lufact</link>
+                <link linkend="diag">diag</link>
+            </member>
+            <member>
+                <link linkend="toeplitz">toeplitz</link>
             </member>
         </simplelist>
     </refsection>