* Bug #14493 fixed - and() and or() help pages were poor and inaccurate. 63/17963/7
Nicolas [Wed, 23 Mar 2016 12:57:10 +0000 (13:57 +0100)]
Change-Id: I88bf83f4cbb98ca58406f568aa2da647335c098c

scilab/CHANGES
scilab/modules/elementary_functions/help/en_US/and.xml
scilab/modules/elementary_functions/help/en_US/or.xml
scilab/modules/elementary_functions/help/fr_FR/and.xml
scilab/modules/elementary_functions/help/fr_FR/or.xml
scilab/modules/elementary_functions/help/ja_JP/and.xml [deleted file]
scilab/modules/elementary_functions/help/ja_JP/or.xml [deleted file]
scilab/modules/elementary_functions/help/pt_BR/and.xml [deleted file]
scilab/modules/elementary_functions/help/pt_BR/or.xml [deleted file]
scilab/modules/elementary_functions/help/ru_RU/and.xml [deleted file]
scilab/modules/elementary_functions/help/ru_RU/or.xml [deleted file]

index 9f0fcb6..3045e6b 100644 (file)
@@ -485,6 +485,8 @@ In 6.0.0:
 
 * Bug #14476 fixed - Dotmultiplication between polynomials and imaginary numbers was always returning 0
 
+* Bug #14493 fixed - and() and or() help pages were poor and inaccurate.
+
 * Bug #14495 fixed - consolebox() help page shew wrong syntaxes and was poor.
 
 * Bug #14499 fixed - getd() did not update already defined functions
index 2c1371c..797757a 100644 (file)
@@ -2,7 +2,7 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
- * 
+ * Copyright (C) 2016 - Samuel GOUGEON
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
 <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="and" xml:lang="en">
     <refnamediv>
         <refname>and</refname>
-        <refpurpose>logical AND of the elements of an array</refpurpose>
+        <refpurpose>logical AND between the elements of a boolean or numerical array</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>b=and(A)
-            b=and(A,'*')
-            b=and(A,'r')
-            b=and(A,1)
-            b=and(A,'c')
-            b=and(A,2)
+        <synopsis>
+            b = and(A)
+            b = and(A, 'r')
+            b = and(A, 'c')
+            b = and(A, n)
         </synopsis>
     </refsynopsisdiv>
-    <refsection>
+    <refsection role="parameters">
+        <title>Arguments</title>
+        <variablelist>
+            <varlistentry>
+                <term>A</term>
+                <listitem>
+                    <para>
+                        vector, matrix, or hypermatrix of booleans,
+                        encoded integers (of any
+                        <link linkend="inttype">inttype</link>), real, or complex numbers.
+                        <varname>A</varname> may be
+                            <link linkend="sparse">sparse</link>-encoded.
+                    </para>
+                    <para>
+                        A number is considered as %F (false) if it is 0 or 0+0i.
+                        Otherwise (including %nan), it is equivalent to %T (true).
+                    </para>
+                    <note>Special <varname>A</varname>:
+                        <itemizedlist>
+                            <listitem>
+                                <literal>and([])</literal> returns <literal>%T</literal>.
+                            </listitem>
+                            <listitem>
+                                <literal>and(%nan)</literal> returns <literal>%T</literal>.
+                            </listitem>
+                        </itemizedlist>
+                    </note>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>b</term>
+                <listitem>
+                    <para>
+                        boolean scalar, if <literal>and(A)</literal>
+                        is used without any option <varname>"r", "c", n</varname>.
+                        Then <literal>and(A)</literal> sets <varname>b</varname> to
+                        <itemizedlist>
+                            <listitem>
+                                %F, if at least one of <varname>A</varname>'s
+                                components is %F or zero.
+                            </listitem>
+                            <listitem>
+                                %T, otherwise: All <varname>A</varname>
+                                components are %T or non zero or %nan.
+                            </listitem>
+                        </itemizedlist>
+                    </para>
+                    <para>
+                        Otherwise: boolean vector, matrix or hypermatrix. See
+                        <varname>n</varname> below.
+                    </para>
+                    <para>
+                        When <varname>A</varname> is sparse-encoded,
+                        <varname>b</varname> is so as well.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>n</term>
+                <listitem>
+                    <para>
+                        Index &lt;= ndims(A) of the dimension along which
+                        <function>and()</function> is applied / projected.
+                        By default, <function>and()</function> is applied between
+                        all <varname>A</varname>'s elements. Otherwise:
+                        <itemizedlist>
+                            <listitem>
+                                n = 1 | "r" : <function>and()</function> is
+                                applied row-wise. If <varname>A</varname>
+                                is a matrix, the result <varname>b</varname> is a
+                                <emphasis role="bold">r</emphasis>ow, with
+                                <literal>b(j) = and(A(:,j))</literal>
+                            </listitem>
+                            <listitem>
+                                n = 2 | "c" :
+                                <function>and()</function> is applied column-wise.
+                                If <varname>A</varname>
+                                is a matrix, the result <varname>b</varname> is a
+                                <emphasis role="bold">c</emphasis>olumn, with
+                                <literal>b(i) = and(A(i,:))</literal>
+                            </listitem>
+                            <listitem>
+                                n > 2 : If <varname>A</varname> is an
+                                hypermatrix with at least <varname>n</varname>
+                                dimensions, <function>and()</function> is applied
+                                accross the n<superscript>th</superscript> dimension.
+                                <para>
+                                    Example: If <literal>ndims(A)==3</literal>
+                                    and <literal>n=3</literal>,
+                                    <varname>b</varname> is a boolean matrix of size
+                                    size(A)([1 2]), with <literal>b(i,j) = and(A(i,j,:))
+                                    </literal>
+                                </para>
+                            </listitem>
+                        </itemizedlist>
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection role="description">
         <title>Description</title>
         <para>
-            <literal>and(A)</literal> is the logical AND of elements of the
-            boolean matrix <literal>A</literal>. <literal>and(A)</literal> returns
-            <literal>%T</literal> ("true") if all entries of <literal>A</literal> are
-            <literal>%T</literal>.
-        </para>
-        <para>
-            <literal>and([])</literal> returns <literal>%T</literal>.
+            <function>and()</function> computes a logical AND between
+            the components of the single input <varname>A</varname>.
         </para>
         <para>
-            <literal>y=and(A,'r')</literal> (or, equivalently,
-            <literal>y=and(A,1)</literal>) is the row-wise AND. It returns in each
-            entry of the row vector <literal>y</literal> the AND of the rows of
-            <literal>x</literal> (The AND is performed on the row index :
-            <literal>y(j)= and(A(i,j),i=1,m)</literal>).
+            To compute AND in an element-wise way between two arrays
+            <literal>C</literal> and <literal>D</literal> of same sizes, please
+            use the <varname>&amp;</varname> operator instead.
         </para>
         <para>
-            <literal>y=and(A,'c')</literal> (or, equivalently,
-            <literal>y=and(A,2)</literal>) is the column-wise AND. It returns in each
-            entry of the column vector <literal>y</literal> the AND of the columns of
-            <literal>x</literal> (The AND is performed on the column index:
-            <literal>y(i)= and(A(i,j),j=1,n)</literal>).
+            Why is <literal>and([])</literal> set to <literal>%T</literal> ?
+            Whatever are compatible <literal>B</literal> and <literal>C</literal>,
+            <literal>and([B C])==(and(B) &amp; and(C))</literal>.
+            Now, for <literal>B = []</literal>, <literal>and([B C])==and(C)</literal>.
+            To have always <literal>(and([]) &amp; and(C))==and(C)</literal>,
+            <literal>and([])</literal> must be <literal>%T</literal>.
         </para>
     </refsection>
-    <refsection>
+    <refsection role="examples">
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-A = [];
-and(A)
+and([])
+and(0)
+and(0+0*%i)
+and(%eps)
+and(%i)
+and(%nan)
 
-A = %T(ones(1, 3));
+// Projection accross a dimension / along a direction:
+A = rand(2,5)<0.5
 and(A)
+and(A, "r")   // and(A, 1) does the same
+and(A, "c")   // and(A, 2) does the same
 
-A = %F(ones(1, 3));
+// Equivalent application to encoded integers:
+A = int16(grand(3,5,"uin",-10,10));
+A(abs(A)<3) = 0
 and(A)
+and(A,1)
+
+// With an hypermatrix of decimal numbers:
+A = rand(3,4,2);
+A(A<0.2) = 0
+and(A,3)
+
+// With a sparse matrix:
+A = sprand(70,100, 0.001)
+and(A, "r")
+and(A, "c")
+]]></programlisting>
+ <screen><![CDATA[--> and([])
+ ans  =
+  T
+
+--> and(0)
+ ans  =
+  F
+
+--> and(0+0*%i)
+ ans  =
+  F
+
+--> and(%eps)
+ ans  =
+  T
+
+--> and(%i)
+ ans  =
+  T
+
+--> and(%nan)
+ ans  =
+  T
+
+--> // Projection accross a dimension / along a direction:
+--> A = rand(2,5)<0.5
+ A  =
+  T T F F F
+  F T F F T
+
+--> and(A)
+ ans  =
+  F
 
-A = %T(ones(1, 3));
-and(A, '*')
-and(A, 'c')
-and(A, 2)
-and(A, 'r')
-and(A, 1)
+--> and(A, "r")   // and(A, 1) does the same
+ ans  =
+  F T F F F
 
- ]]></programlisting>
+--> and(A, "c")   // and(A, 2) does the same
+ ans  =
+  F
+  F
+
+--> // Equivalent application to encoded integers:
+--> A = int16(grand(3,5,"uin",-10,10));
+--> A(abs(A)<3) = 0
+ A  =
+   0  0  -8  -6    8
+ -10  6  -5   3  -10
+   0  3 -10   7   10
+
+--> and(A)
+ ans  =
+  F
+
+--> and(A,1)
+ ans  =
+  F F T T T
+
+--> // With an hypermatrix of decimal numbers:
+--> A = rand(3,4,2);
+--> A(A<0.2) = 0
+ A  =
+(:,:,1)
+   0.4052   0.4819   0.2806   0.2119
+   0.9185   0.264    0.       0.
+   0.       0.4148   0.7783   0.6857
+(:,:,2)
+   0.       0.4062   0.       0.5896
+   0.6971   0.4095   0.       0.6854
+   0.8416   0.8784   0.5619   0.8906
+
+--> and(A,3)
+ ans  =
+  F T F T
+  T T F F
+  F T T T
+
+--> // With a sparse matrix:
+--> A = sprand(70,100, 0.001)
+ A  =
+(  70,  100) sparse matrix
+
+(  4,  87)    0.6463
+(  5,  39)    0.4898
+(  7,  92)    0.7094
+(  29,  87)   0.794
+(  33,   1)   0.4087
+(  36,  79)   0.4876
+(  54,  65)   0.4456
+(  67,  45)   0.458
+
+--> and(A, "r")
+ ans  =
+(  1,  100)False sparse matrix
+
+--> and(A, "c")
+ ans  =
+(  70,  1)False sparse matrix
+]]></screen>
     </refsection>
-    
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="not">not</link>
+                <link linkend="and_op">&amp; (element-wise)</link>
             </member>
             <member>
-                <link linkend="and_op">and operator (&amp;) </link>
+                <link linkend="or">or</link>
             </member>
             <member>
-                <link linkend="or">or</link>
+                <link linkend="not">not</link>
             </member>
         </simplelist>
     </refsection>
index 77a1719..39d1f02 100644 (file)
@@ -2,7 +2,7 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
- * 
+ * Copyright (C) 2016 - Samuel GOUGEON
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
 <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="or" xml:lang="en">
     <refnamediv>
         <refname>or</refname>
-        <refpurpose>logical OR of the elements of an array</refpurpose>
+        <refpurpose>logical OR over the elements of a boolean or numerical array</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>or(A), or(A,'*')
-            or(A,'r'), or(A,1)
-            
-            or(A,'c'), or(A,2)
+        <synopsis>
+            b = or(A)
+            b = or(A, 'r')
+            b = or(A, 'c')
+            b = or(A, n)
         </synopsis>
     </refsynopsisdiv>
-    <refsection>
+    <refsection role="parameters">
+        <title>Arguments</title>
+        <variablelist>
+            <varlistentry>
+                <term>A</term>
+                <listitem>
+                    <para>
+                        vector, matrix, or hypermatrix of booleans,
+                        encoded integers (of any
+                        <link linkend="inttype">inttype</link>), real, or complex numbers.
+                        <varname>A</varname> may be
+                        <link linkend="sparse">sparse</link>-encoded.
+                    </para>
+                    <para>
+                        A number is considered as %F (false) if it is 0 or 0+0i.
+                        Otherwise (including %nan), it is equivalent to %T (true).
+                    </para>
+                    <note>Special <varname>A</varname>:
+                        <itemizedlist>
+                            <listitem>
+                                <literal>or([])</literal> returns <literal>%F</literal>.
+                            </listitem>
+                            <listitem>
+                                <literal>or(%nan)</literal> returns <literal>%T</literal>.
+                            </listitem>
+                        </itemizedlist>
+                    </note>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>b</term>
+                <listitem>
+                    <para>
+                        boolean scalar, if <literal>or(A)</literal>
+                        is used without any option <varname>"r", "c", n</varname>.
+                        It is set to
+                        <itemizedlist>
+                            <listitem>
+                                %F, if all <varname>A</varname>'s components are %F or zero.
+                            </listitem>
+                            <listitem>
+                                %T, otherwise (at least one <varname>A</varname>'s
+                                component is %T or non-zero).
+                            </listitem>
+                        </itemizedlist>
+                    </para>
+                    <para>
+                        Otherwise: boolean vector, matrix or hypermatrix.
+                    </para>
+                    <para>
+                        When <varname>A</varname> is sparse-encoded,
+                        <varname>b</varname> is so as well.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>n</term>
+                <listitem>
+                    <para>Index &lt;= ndims(A) of the dimension along which
+                        <function>or()</function> is applied / projected.
+                        By default, <function>or()</function> is applied between
+                        all <varname>A</varname>'s elements. Otherwise:
+                        <itemizedlist>
+                            <listitem>
+                                n = 1 | "r" : <function>or()</function> is
+                                applied row-wise. If <varname>A</varname>
+                                is a matrix, the result <varname>b</varname> is a
+                                <emphasis role="bold">r</emphasis>ow, with
+                                <literal>b(j) = or(A(:,j))</literal>
+                            </listitem>
+                            <listitem>
+                                n = 2 | "c" :
+                                <function>or()</function> is applied column-wise.
+                                If <varname>A</varname>
+                                is a matrix, the result <varname>b</varname> is a
+                                <emphasis role="bold">c</emphasis>olumn, with
+                                <literal>b(i) = or(A(i,:))</literal>
+                            </listitem>
+                            <listitem>
+                                n > 2 : If <varname>A</varname> is an
+                                hypermatrix with at least <varname>n</varname>
+                                dimensions, <function>or()</function> is applied
+                                accross the n<superscript>th</superscript> dimension.
+                                <para>
+                                    Example: If <literal>ndims(A)==3</literal>
+                                    and <literal>n=3</literal>,
+                                    <varname>b</varname> is a boolean matrix of size
+                                    size(A)([1 2]), with <literal>b(i,j) = or(A(i,j,:))
+                                    </literal>
+                                </para>
+                            </listitem>
+                        </itemizedlist>
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection role="description">
         <title>Description</title>
         <para>
-            <literal>or(A)</literal> gives the <literal>or</literal> of the
-            elements of the boolean matrix <literal>A</literal>.
-            <literal>or(A)</literal> is true (<literal>%t</literal>) if at least one
-            entry of <literal>A</literal> is <literal>%t</literal>.
-        </para>
-        <para>
-            <literal>or([])</literal> returns <literal>%F</literal>.
+            <function>or()</function> computes a logical OR between
+            the components of the single input <varname>A</varname>.
         </para>
         <para>
-            <literal>y=or(A,'r')</literal> (or, equivalently,
-            <literal>y=or(A,1)</literal>) is the row-wise OR. It returns in each entry
-            of the row vector <literal>y</literal> the OR of the rows of
-            <literal>x</literal> (The OR is performed on the row index :
-            <literal>y(j)= or(A(i,j),i=1,m)</literal>).
+            To compute OR in an element-wise way between two arrays
+            <literal>C</literal> and <literal>D</literal> of same sizes, please
+            use the <varname>|</varname> operator instead.
         </para>
         <para>
-            <literal>y=or(A,'c')</literal> (or, equivalently,
-            <literal>y=or(A,2)</literal>) is the column-wise OR. It returns in each
-            entry of the column vector <literal>y</literal> the OR of the columns of
-            <literal>x</literal> (The OR is performed on the column index:
-            <literal>y(i)= or(A(i,j),j=1,n)</literal>)). 
+            Why is <literal>or([])</literal> equal to <literal>%F</literal> ?
+            Whatever are compatible <literal>B</literal> and <literal>C</literal>,
+            <literal>or([B C]) == (or(B) | or(C))</literal>.
+            Now, for <literal>B = []</literal>, <literal>or([B C]) == or(C)</literal>.
+            To have always <literal>(or([]) | or(C))==or(C)</literal> whatever is
+            <literal>C</literal>,
+            <literal>or([])</literal> must be <literal>%F</literal>.
         </para>
-        <para/>
     </refsection>
-    <refsection>
+    <refsection role="examples">
         <title>Examples</title>
-        <programlisting role="example"><![CDATA[ 
-or([%t %t %f])
- ]]></programlisting>
+        <programlisting role="example"><![CDATA[
+or([])
+or(0)
+or(0+0*%i)
+or(%eps)
+or(%i)
+or(%nan)
+
+// Projection accross a dimension / along a direction:
+A = rand(2,5)<0.3
+or(A)
+or(A, "r")   // or(A, 1) does the same
+or(A, "c")   // or(A, 2) does the same
+
+// Equivalent application to encoded integers:
+A = int16(grand(3,5,"uin",-10,10));
+A(abs(A)<8) = 0
+or(A)
+or(A,1)
+
+// With an hypermatrix of decimal numbers:
+A = rand(3,4,2);
+A(A<0.7) = 0
+or(A,3)
+
+// With a sparse matrix:
+A = sprand(70,100, 0.001)
+or(A, "r")
+or(A, "c")
+]]></programlisting>
+ <screen><![CDATA[--> or([])
+ ans  =
+  F
+
+--> or(0)
+ ans  =
+  F
+
+--> or(0+0*%i)
+ ans  =
+  F
+
+--> or(%eps)
+ ans  =
+  T
+
+--> or(%i)
+ ans  =
+  T
+
+--> or(%nan)
+ ans  =
+  F           // %T expected => Bug 14522
+
+--> // Projection accross a dimension / along a direction:
+--> A = rand(2,5)<0.3
+ A  =
+  T F F F F
+  F F T F F
+
+--> or(A)
+ ans  =
+  T
+
+--> or(A, "r")   // or(A, 1) does the same
+ ans  =
+  T F T F F
+
+--> or(A, "c")   // or(A, 2) does the same
+ ans  =
+  T
+  T
+
+--> // Equivalent application to encoded integers:
+--> A = int16(grand(3,5,"uin",-10,10));
+--> A(abs(A)<8) = 0
+ A  =
+  0  0  0 -9  0
+  0 10  0  0  0
+  0  0  0  0  9
+
+--> or(A)
+ ans  =
+  T
+
+--> or(A,1)
+ ans  =
+  F T F T T
+
+
+--> // With an hypermatrix of decimal numbers:
+--> A = rand(3,4,2);
+--> A(A<0.7) = 0
+ A  =
+(:,:,1)
+   0.   0.       0.   0.
+   0.   0.7065   0.   0.7227
+   0.   0.       0.   0.8977
+(:,:,2)
+   0.       0.   0.       0.7901
+   0.       0.   0.       0.9809
+   0.9677   0.   0.7795   0.8187
+
+--> or(A,3)
+ ans  =
+  F F F T
+  F T F T
+  T F T T
+
+
+--> // With a sparse matrix:
+--> A = sprand(70,100, 0.001)
+ A  =
+(  70,  100) sparse matrix
+
+(  18,  53)   0.7943
+(  23,  96)   0.4361
+(  38,  34)   0.9275
+(  56,   1)   0.1622
+(  69,  98)   0.3112
+
+--> or(A, "r")
+ ans  =
+(  1,  100) sparse matrix
+
+(  1,   1)  T
+(  1,  34)  T
+(  1,  53)  T
+(  1,  96)  T
+(  1,  98)  T
+
+--> or(A, "c")
+ ans  =
+(  70,  1) sparse matrix
+
+(  18,  1)  T
+(  23,  1)  T
+(  38,  1)  T
+(  56,  1)  T
+(  69,  1)  T
+]]></screen>
     </refsection>
     <refsection role="see also">
         <title>See Also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="or_op">or operator (|)</link>
+                <link linkend="or_op">| (element-wise)</link>
             </member>
             <member>
                 <link linkend="and">and</link>
             </member>
             <member>
-                <link linkend="not">not</link>
-            </member>
-            <member>
-                <link linkend="find">find</link>
+                <link linkend="not">~ not</link>
             </member>
         </simplelist>
     </refsection>
index 57ebeba..fa33a57 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA
+ * Copyright (C) 2016 - 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="and" xml:lang="fr">
     <refnamediv>
         <refname>and</refname>
-        <refpurpose>et logique des éléments d'un tableau</refpurpose>
+        <refpurpose>ET logique entre éléments d'un tableau booléen ou numérique</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
-        <title>Séquence d'appel</title>
-        <synopsis>b=and(A), b=and(A,'*')
-            b=and(A,'r'), b=and(A,1)
-            b=and(A,'c'), b=and(A,2)
+        <title>Syntaxe</title>
+        <synopsis>
+            b = and(A)
+            b = and(A, 'r')
+            b = and(A, 'c')
+            b = and(A, n)
         </synopsis>
     </refsynopsisdiv>
-    <refsection>
+    <refsection role="parameters">
+        <title>Paramètres</title>
+        <variablelist>
+            <varlistentry>
+                <term>A</term>
+                <listitem>
+                    <para>
+                        vecteur, matrice ou hypermatrice de booléens, d'entiers
+                        encodés (de type entier <link linkend="inttype">inttype</link>
+                        quelconque), de décimaux, ou de nombres complexes.
+                        <varname>A</varname> peut être encodée creuse
+                            (<link linkend="sparse">sparse</link>).
+                    </para>
+                    <para>
+                        Un nombre est identifié à <literal>%F</literal> (faux)
+                        s'il vaut 0 ou 0+0i. Sinon (%nan inclus), il est identifé
+                        à <literal>%T</literal> (vrai).
+                    </para>
+                    <note>Valeurs particulières de <varname>A</varname> :
+                        <itemizedlist>
+                            <listitem>
+                                <literal>and([])</literal> vaut <literal>%T</literal>.
+                            </listitem>
+                            <listitem>
+                                <literal>and(%nan)</literal> vaut <literal>%T</literal>.
+                            </listitem>
+                        </itemizedlist>
+                    </note>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>b</term>
+                <listitem>
+                    <para>
+                        Booléen simple si <literal>and(A)</literal> est utilisée
+                        sans option <varname>"r", "c", n</varname>.
+                        <varname>b</varname> vaut alors
+                        <itemizedlist>
+                            <listitem>
+                                %F, si au moins un des éléments de <varname>A</varname>
+                                est %F ou zéro.
+                            </listitem>
+                            <listitem>
+                                %T, sinon : tous les éléments de <varname>A</varname>
+                                sont %T ou non nuls ou %nan.
+                            </listitem>
+                        </itemizedlist>
+                    </para>
+                    <para>
+                        Sinon : vecteur ligne, colonne, matrice ou hypermatrice.
+                        Voir la description de <varname>n</varname> ci-dessous.
+                    </para>
+                    <para>
+                        Lorsque <varname>A</varname> est encodée creuse,
+                        <varname>b</varname> l'est également.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>n</term>
+                <listitem>
+                    <para>
+                        N° &lt;= ndims(A) de la dimension selon laquelle
+                        <function>and()</function> est appliqué / projeté.
+                        Par défaut, <function>and()</function> est appliqué
+                        entre <emphasis>tous</emphasis> les éléments de
+                        <varname>A</varname>. Sinon :
+                        <itemizedlist>
+                            <listitem>
+                                n = 1 | "r" : <function>and()</function> est
+                                appliqué entre les rangées de <varname>A</varname>.
+                                Si <varname>A</varname> est une matrice,
+                                <varname>b</varname> est alors une
+                                <emphasis role="bold">r</emphasis>angée, avec
+                                <literal>b(j) = and(A(:,j))</literal>
+                            </listitem>
+                            <listitem>
+                                n = 2 | "c" :
+                                <function>and()</function> est appliqué entre les
+                                colonnes de <varname>A</varname>.
+                                Si <varname>A</varname> est une matrice,
+                                <varname>b</varname> est alors une
+                                <emphasis role="bold">c</emphasis>olonne, avec
+                                <literal>b(i) = and(A(i,:))</literal>.
+                            </listitem>
+                            <listitem>
+                                n > 2 : Si <varname>A</varname> est une hypermatrice
+                                <function>and()</function> est appliqué selon
+                                sa n<superscript>ème</superscript> dimension.
+                                <para>
+                                    Exemple: Si <literal>ndims(A)==3</literal>
+                                    et <literal>n=3</literal>,
+                                    <varname>b</varname> sera une matrice booléenne
+                                    de tailles <literal>size(A)([1 2])</literal>, avec
+                                    <literal>b(i,j) = and(A(i,j,:))</literal>.
+                                </para>
+                            </listitem>
+                        </itemizedlist>
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection role="description">
         <title>Description</title>
         <para>
-            <literal>and(A)</literal> donne la conjonction (et) logique des
-            éléments de la matrice booléenne <literal>A</literal>.
-            <literal>and(A)</literal> est vrai (<literal>%t</literal>) si tous les
-            termes de <literal>A</literal> sont <literal>%t</literal>.
-        </para>
-        <para>
-            <literal>and([])</literal> retourne <literal>%T</literal>.
+            <function>and()</function> applique un "ET" logique entre les éléments
+            de l'opérande unique <varname>A</varname>, et en calcule le résultat.
         </para>
         <para>
-            <literal>y=and(A,'r')</literal> (et <literal>y=and(A,1)</literal>)
-            donne la conjonction suivant l'indice de ligne. Chaque élément du vecteur
-            ligne <literal>y</literal> contient la conjonction de chaque colonne de
-            <literal>x</literal> (<literal>y(j)= and(A(i,j),i=1,m)</literal>).
+            Pour appliquer un ET logique entre éléments respectifs de 2 tableaux
+            <literal>C</literal> et <literal>D</literal> de mêmes tailles,
+            utiliser l'opérateur dédié <varname>&amp;</varname>.
         </para>
         <para>
-            <literal>y=and(A,'c')</literal> (et <literal>y=and(A,2)</literal>)
-            donne la conjonction suivant l'indice de colonne. Chaque élément du
-            vecteur colonne <literal>y</literal> contient la conjonction de chaque
-            ligne de <literal>x</literal> (<literal>y(i)=
-                and(A(i,j),j=1,n)
-            </literal>
-            )).
+            Pourquoi <literal>and([])</literal> vaut-il <literal>%T</literal> ?
+            Quels que soient les tableaux compatibles <literal>B</literal> et
+            <literal>C</literal>,
+            <literal>and([B C]) == ( and(B) &amp; and(C) )</literal>.
+            Or, pour <literal>B = []</literal>, <literal>and([B C])==and(C)</literal>.
+            Pour avoir toujours <literal>(and([]) &amp; and(C)) == and(C)</literal>,
+            <literal>and([])</literal> doit être <literal>%T</literal>.
         </para>
     </refsection>
+    <refsection role="examples">
+        <title>Exemples</title>
+        <programlisting role="example"><![CDATA[
+and([])
+and(0)
+and(0+0*%i)
+and(%eps)
+and(%i)
+and(%nan)
+
+// Projection à travers une dimension / selon une direction :
+A = rand(2,5)<0.5
+and(A)
+and(A, "r")   // and(A, 1) est équivalent
+and(A, "c")   // and(A, 2) est équivalent
+
+// Utilisation entre entiers encodés :
+A = int16(grand(3,5,"uin",-10,10));
+A(abs(A)<3) = 0
+and(A)
+and(A,1)
+
+// Avec une hypermatrice de nombres décimaux :
+A = rand(3,4,2);
+A(A<0.2) = 0
+and(A,3)
+
+// Avec une matrice encodée creuse :
+A = sprand(70,100, 0.001)
+and(A, "r")
+and(A, "c")
+]]></programlisting>
+ <screen><![CDATA[--> and([])
+ ans  =
+  T
+
+--> and(0)
+ ans  =
+  F
+
+--> and(0+0*%i)
+ ans  =
+  F
+
+--> and(%eps)
+ ans  =
+  T
+
+--> and(%i)
+ ans  =
+  T
+
+--> and(%nan)
+ ans  =
+  T
+
+--> // Projection à travers une dimension / selon une direction :
+--> A = rand(2,5)<0.5
+ A  =
+  T T F F F
+  F T F F T
+
+--> and(A)
+ ans  =
+  F
+
+--> and(A, "r")   // and(A, 1) est équivalent
+ ans  =
+  F T F F F
+
+--> and(A, "c")   // and(A, 2) est équivalent
+ ans  =
+  F
+  F
+
+--> // Utilisation entre entiers encodés :
+--> A = int16(grand(3,5,"uin",-10,10));
+--> A(abs(A)<3) = 0
+ A  =
+   0  0  -8  -6    8
+ -10  6  -5   3  -10
+   0  3 -10   7   10
+
+--> and(A)
+ ans  =
+  F
+
+--> and(A,1)
+ ans  =
+  F F T T T
+
+--> // Avec une hypermatrice de nombres décimaux :
+--> A = rand(3,4,2);
+--> A(A<0.2) = 0
+ A  =
+(:,:,1)
+   0.4052   0.4819   0.2806   0.2119
+   0.9185   0.264    0.       0.
+   0.       0.4148   0.7783   0.6857
+(:,:,2)
+   0.       0.4062   0.       0.5896
+   0.6971   0.4095   0.       0.6854
+   0.8416   0.8784   0.5619   0.8906
+
+--> and(A,3)
+ ans  =
+  F T F T
+  T T F F
+  F T T T
+
+--> // Avec une matrice encodée creuse :
+--> A = sprand(70,100, 0.001)
+ A  =
+(  70,  100) sparse matrix
+
+(  4,  87)    0.6463
+(  5,  39)    0.4898
+(  7,  92)    0.7094
+(  29,  87)   0.794
+(  33,   1)   0.4087
+(  36,  79)   0.4876
+(  54,  65)   0.4456
+(  67,  45)   0.458
+
+--> and(A, "r")
+ ans  =
+(  1,  100)False sparse matrix
+
+--> and(A, "c")
+ ans  =
+(  70,  1)False sparse matrix
+]]></screen>
+    </refsection>
     <refsection role="see also">
         <title>Voir aussi</title>
         <simplelist type="inline">
             <member>
-                <link linkend="not">not</link>
+                <link linkend="and_op">&amp; (distributif)</link>
             </member>
             <member>
-                <link linkend="and_op">opérateur logique et (&amp;) </link>
+                <link linkend="or">or</link>
             </member>
             <member>
-                <link linkend="or">or</link>
+                <link linkend="not">~ not</link>
             </member>
         </simplelist>
     </refsection>
index 700612e..10edf2e 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2008 - INRIA
+ * Copyright (C) 2016 - 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="or" xml:lang="fr">
     <refnamediv>
         <refname>or</refname>
-        <refpurpose>disjonction logique des éléments d'un tableau</refpurpose>
+        <refpurpose>OU logique entre éléments d'un tableau booléen ou numérique</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
-        <title>Séquence d'appel</title>
-        <synopsis>or(A), or(A,'*')
-            or(A,'r'), or(A,1)
-            
-            or(A,'c'), or(A,2)
+        <title>Syntaxe</title>
+        <synopsis>
+            b = or(A)
+            b = or(A, 'r')
+            b = or(A, 'c')
+            b = or(A, n)
         </synopsis>
     </refsynopsisdiv>
-    <refsection>
+    <refsection role="parameters">
+        <title>Paramètres</title>
+        <variablelist>
+            <varlistentry>
+                <term>A</term>
+                <listitem>
+                    <para>
+                        vecteur, matrice ou hypermatrice de booléens, d'entiers
+                        encodés (de type entier <link linkend="inttype">inttype</link>
+                        quelconque), de décimaux, ou de nombres complexes.
+                        <varname>A</varname> peut être encodée creuse
+                            (<link linkend="sparse">sparse</link>).
+                    </para>
+                    <para>
+                        Un nombre est identifié à <literal>%F</literal> (faux)
+                        s'il vaut 0 ou 0+0i. Sinon (%nan inclus), il est identifé
+                        à <literal>%T</literal> (vrai).
+                    </para>
+                    <note>Valeurs particulières de <varname>A</varname> :
+                        <itemizedlist>
+                            <listitem>
+                                <literal>or([])</literal> vaut <literal>%F</literal>.
+                            </listitem>
+                            <listitem>
+                                <literal>or(%nan)</literal> vaut <literal>%T</literal>.
+                            </listitem>
+                        </itemizedlist>
+                    </note>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>b</term>
+                <listitem>
+                    <para>
+                        Booléen simple si <literal>or(A)</literal> est utilisée
+                        sans option <varname>"r", "c", n</varname>.
+                        <varname>b</varname> vaut alors
+                        <itemizedlist>
+                            <listitem>
+                                %F, si tous les éléments de <varname>A</varname>
+                                sont %F ou nuls.
+                            </listitem>
+                            <listitem>
+                                %T, sinon : au moins un des éléments de <varname>A</varname>
+                                est %T ou non nul.
+                            </listitem>
+                        </itemizedlist>
+                    </para>
+                    <para>
+                        Sinon : vecteur ligne, colonne, matrice ou hypermatrice.
+                        Voir la description de <varname>n</varname> ci-dessous.
+                    </para>
+                    <para>
+                        Lorsque <varname>A</varname> est encodée creuse,
+                        <varname>b</varname> l'est également.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>n</term>
+                <listitem>
+                    <para>
+                        N° &lt;= ndims(A) de la dimension selon laquelle
+                        <function>or()</function> est appliqué / projeté.
+                        Par défaut, <function>or()</function> est appliqué
+                        entre <emphasis>tous</emphasis> les éléments de
+                        <varname>A</varname>. Sinon :
+                        <itemizedlist>
+                            <listitem>
+                                n = 1 | "r" : <function>or()</function> est
+                                appliqué entre les rangées de <varname>A</varname>.
+                                Si <varname>A</varname> est une matrice,
+                                <varname>b</varname> est alors une
+                                <emphasis role="bold">r</emphasis>angée, avec
+                                <literal>b(j) = or(A(:,j))</literal>
+                            </listitem>
+                            <listitem>
+                                n = 2 | "c" :
+                                <function>or()</function> est appliqué entre les
+                                colonnes de <varname>A</varname>.
+                                Si <varname>A</varname> est une matrice,
+                                <varname>b</varname> est alors une
+                                <emphasis role="bold">c</emphasis>olonne, avec
+                                <literal>b(i) = or(A(i,:))</literal>.
+                            </listitem>
+                            <listitem>
+                                n > 2 : Si <varname>A</varname> est une hypermatrice
+                                <function>or()</function> est appliqué selon
+                                sa n<superscript>ème</superscript> dimension.
+                                <para>
+                                    Exemple: Si <literal>ndims(A)==3</literal>
+                                    et <literal>n=3</literal>,
+                                    <varname>b</varname> sera une matrice booléenne
+                                    de tailles <literal>size(A)([1 2])</literal>, avec
+                                    <literal>b(i,j) = or(A(i,j,:))</literal>.
+                                </para>
+                            </listitem>
+                        </itemizedlist>
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection role="description">
         <title>Description</title>
         <para>
-            <literal>or(A)</literal> donne la disjonction (ou) logique des
-            éléments de la matrice booléenne <literal>A</literal>.
-            <literal>or(A)</literal> est vrai (<literal>%t</literal>) si au moins un
-            terme de <literal>A</literal> est <literal>%t</literal>.
-        </para>
-        <para>
-            <literal>or([])</literal> retourne <literal>%F</literal>.
+            <function>or()</function> applique un "OU" logique entre les éléments
+            de l'opérande unique <varname>A</varname>, et en calcule le résultat.
         </para>
         <para>
-            <literal>y=or(A,'r')</literal> (ou <literal>y=or(A,1)</literal>) est
-            la disjonction suivant l'indice de ligne. Chaque élément du vecteur ligne
-            <literal>y</literal> contient la disjonction de chaque colonne de
-            <literal>x</literal> (<literal>y(j)= or(A(i,j),i=1,m)</literal>).
+            Pour appliquer un OU logique entre éléments respectifs de 2 tableaux
+            <literal>C</literal> et <literal>D</literal> de mêmes tailles,
+            utiliser l'opérateur dédié <varname>|</varname>.
         </para>
         <para>
-            <literal>y=or(A,'c')</literal> (ou <literal>y=or(A,2)</literal>) est
-            la disjonction suivant l'indice de colonne. Chaque élément du vecteur
-            colonne <literal>y</literal> contient la disjonction de chaque ligne de
-            <literal>x</literal> (<literal>y(i)= or(A(i,j),j=1,n)</literal>)).
+            Pourquoi <literal>or([])</literal> vaut-il <literal>%F</literal> ?
+            Quels que soient les tableaux compatibles <literal>B</literal> et
+            <literal>C</literal>,
+            <literal>or([B C]) == (or(B) | or(C))</literal>.
+            Or, pour <literal>B = []</literal>, <literal>or([B C])==or(C)</literal>.
+            Pour avoir toujours <literal>(or([]) | or(C)) == or(C)</literal>,
+            <literal>or([])</literal> doit impérativement être <literal>%F</literal>.
         </para>
     </refsection>
-    <refsection>
+    <refsection role="examples">
         <title>Exemples</title>
-        <programlisting role="example"><![CDATA[ 
-or([%t %t %f])
- ]]></programlisting>
+        <programlisting role="example"><![CDATA[
+or([])
+or(0)
+or(0+0*%i)
+or(%eps)
+or(%i)
+or(%nan)
+
+// Projection à travers une dimension / selon une direction :
+A = rand(2,5)<0.3
+or(A)
+or(A, "r")   // or(A, 1) est équivalent
+or(A, "c")   // or(A, 2) est équivalent
+
+// Utilisation entre entiers encodés :
+A = int16(grand(3,5,"uin",-10,10));
+A(abs(A)<8) = 0
+or(A)
+or(A,1)
+
+// Avec une hypermatrice de nombres décimaux :
+A = rand(3,4,2);
+A(A<0.7) = 0
+or(A,3)
+
+// Avec une matrice encodée creuse :
+A = sprand(70,100, 0.001)
+or(A, "r")
+or(A, "c")
+]]></programlisting>
+ <screen><![CDATA[--> or([])
+ ans  =
+  F
+
+--> or(0)
+ ans  =
+  F
+
+--> or(0+0*%i)
+ ans  =
+  F
+
+--> or(%eps)
+ ans  =
+  T
+
+--> or(%i)
+ ans  =
+  T
+
+--> or(%nan)
+ ans  =
+  F           // %T attendu  => Bug 14522
+
+--> // Projection à travers une dimension / selon une direction :
+--> A = rand(2,5)<0.3
+ A  =
+  T F F F F
+  F F T F F
+
+--> or(A)
+ ans  =
+  T
+
+--> or(A, "r")   // or(A, 1) est équivalent
+ ans  =
+  T F T F F
+
+--> or(A, "c")   // or(A, 2) est équivalent
+ ans  =
+  T
+  T
+
+--> // Utilisation entre entiers encodés :
+--> A = int16(grand(3,5,"uin",-10,10));
+--> A(abs(A)<8) = 0
+ A  =
+  0  0  0 -9  0
+  0 10  0  0  0
+  0  0  0  0  9
+
+--> or(A)
+ ans  =
+  T
+
+--> or(A,1)
+ ans  =
+  F T F T T
+
+
+--> // Avec une hypermatrice de nombres décimaux :
+--> A = rand(3,4,2);
+--> A(A<0.7) = 0
+ A  =
+(:,:,1)
+   0.   0.       0.   0.
+   0.   0.7065   0.   0.7227
+   0.   0.       0.   0.8977
+(:,:,2)
+   0.       0.   0.       0.7901
+   0.       0.   0.       0.9809
+   0.9677   0.   0.7795   0.8187
+
+--> or(A,3)
+ ans  =
+  F F F T
+  F T F T
+  T F T T
+
+
+--> // Avec une matrice encodée creuse :
+--> A = sprand(70,100, 0.001)
+ A  =
+(  70,  100) sparse matrix
+
+(  18,  53)   0.7943
+(  23,  96)   0.4361
+(  38,  34)   0.9275
+(  56,   1)   0.1622
+(  69,  98)   0.3112
+
+--> or(A, "r")
+ ans  =
+(  1,  100) sparse matrix
+
+(  1,   1)  T
+(  1,  34)  T
+(  1,  53)  T
+(  1,  96)  T
+(  1,  98)  T
+
+--> or(A, "c")
+ ans  =
+(  70,  1) sparse matrix
+
+(  18,  1)  T
+(  23,  1)  T
+(  38,  1)  T
+(  56,  1)  T
+(  69,  1)  T
+]]></screen>
     </refsection>
     <refsection role="see also">
         <title>Voir aussi</title>
         <simplelist type="inline">
             <member>
-                <link linkend="or_op">opérateur logique ou (|)</link>
+                <link linkend="or_op">| (distributif)</link>
             </member>
             <member>
                 <link linkend="and">and</link>
             </member>
             <member>
-                <link linkend="not">not</link>
-            </member>
-            <member>
-                <link linkend="find">find</link>
+                <link linkend="not">~ not</link>
             </member>
         </simplelist>
     </refsection>
diff --git a/scilab/modules/elementary_functions/help/ja_JP/and.xml b/scilab/modules/elementary_functions/help/ja_JP/and.xml
deleted file mode 100644 (file)
index 72fc43d..0000000
+++ /dev/null
@@ -1,162 +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="and" xml:lang="ja">
-    
-    <refnamediv>
-        
-        <refname>and</refname>
-        
-        <refpurpose>配列の要素の論理積</refpurpose>
-        
-    </refnamediv>
-    
-    <refsynopsisdiv>
-        
-        <title>呼び出し手順</title>
-        
-        <synopsis>b=and(A)
-            
-            b=and(A,'*')
-            
-            b=and(A,'r')
-            
-            b=and(A,1)
-            
-            b=and(A,'c')
-            
-            b=and(A,2)
-            
-        </synopsis>
-        
-    </refsynopsisdiv>
-    
-    <refsection>
-        
-        <title>説明</title>
-        
-        <para>
-            
-            <literal>and(A)</literal> は, 論理値行列<literal>A</literal>の
-            
-            要素の論理積(AND)です. 
-            
-            <literal>A</literal>の全エントリが <literal>%T</literal> である場合にのみ
-            
-            <literal>and(A)</literal> は<literal>%T</literal> ("true")
-            
-            となります.
-            
-        </para>
-        
-        <para>
-            
-            <literal>and([])</literal> は <literal>%T</literal>を返します.
-            
-        </para>
-        
-        <para>
-            
-            <literal>y=and(A,'r')</literal> (または, 等価な
-            
-            <literal>y=and(A,1)</literal>) は行方向の論理積です. 
-            
-            行ベクトル <literal>y</literal> の各エントリに,
-            
-            <literal>x</literal>の各行の論理積を返します.
-            
-            (この and は次のように行添え字に関して行われます :
-            
-            <literal>y(j)= and(A(i,j),i=1,m)</literal>).
-            
-        </para>
-        
-        <para>
-            
-            <literal>y=and(A,'c')</literal> (または, 等価な
-            
-            <literal>y=and(A,2)</literal>) は列方向の論理積です. 
-            
-            列ベクトル<literal>y</literal>の各エントリに,
-            
-            <literal>x</literal>の各列の論理積を返します.
-            
-            返します.
-            
-            (このandは次のように列添え字に関して行われます:
-            
-            <literal>y(i)= and(A(i,j),j=1,n)</literal>)
-            
-        </para>
-        
-    </refsection>
-    
-    <refsection>
-        
-        <title>例</title>
-        
-        <programlisting role="example"><![CDATA[
-A = [];
-and(A)
-
-A = %T(ones(1, 3));
-and(A)
-
-A = %F(ones(1, 3));
-and(A)
-
-A = %T(ones(1, 3));
-and(A, '*')
-and(A, 'c')
-and(A, 2)
-and(A, 'r')
-and(A, 1)
-
- ]]></programlisting>
-        
-    </refsection>
-    
-    <refsection role="see also">
-        
-        <title>参照</title>
-        
-        <simplelist type="inline">
-            
-            <member>
-                
-                <link linkend="not">not</link>
-                
-            </member>
-            
-            <member>
-                
-                <link linkend="and_op">and 演算子 (&amp;) </link>
-                
-            </member>
-            
-            <member>
-                
-                <link linkend="or">or</link>
-                
-            </member>
-            
-        </simplelist>
-        
-    </refsection>
-    
-</refentry>
-
diff --git a/scilab/modules/elementary_functions/help/ja_JP/or.xml b/scilab/modules/elementary_functions/help/ja_JP/or.xml
deleted file mode 100644 (file)
index 20d3f36..0000000
+++ /dev/null
@@ -1,79 +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="or" xml:lang="ja">
-    <refnamediv>
-        <refname>or</refname>
-        <refpurpose>配列の要素の論理和</refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>呼び出し手順</title>
-        <synopsis>or(A), or(A,'*')
-            or(A,'r'), or(A,1)
-            or(A,'c'), or(A,2)
-        </synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>説明</title>
-        <para>
-            <literal>or(A)</literal> は論理値行列<literal>A</literal>の
-            要素の <literal>or</literal> を取得します.
-            <literal>or(A)</literal> は,
-            <literal>A</literal>の少なくとも1個の要素が<literal>%t</literal>
-            の場合に限り,
-            真 (<literal>%t</literal>)となります.
-        </para>
-        <para>
-            <literal>y=or(A,'r')</literal> (または, 等価的に
-            <literal>y=or(A,1)</literal>) は行方向の論理和となります.
-            行ベクトル <literal>y</literal>の各エントリに
-            <literal>x</literal>の各行の論理和が返されます.
-            (論理和は行添字について実行されます :
-            <literal>y(j)= or(A(i,j),i=1,m)</literal>).
-        </para>
-        <para>
-            <literal>y=or(A,'c')</literal> (または, 等価的に
-            <literal>y=or(A,2)</literal>) は列方向の論理和となります.
-            列ベクトル <literal>y</literal>の各エントリに
-            <literal>x</literal>の各列の論理和が返されます.
-            (論理和は列添字について実行されます :
-            <literal>y(i)= or(A(i,j),j=1,n)</literal>).
-        </para>
-        <para/>
-    </refsection>
-    <refsection>
-        <title>例</title>
-        <programlisting role="example"><![CDATA[ 
-or([%t %t %f])
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>参照</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="or_op">or 演算子 (|)</link>
-            </member>
-            <member>
-                <link linkend="and">and</link>
-            </member>
-            <member>
-                <link linkend="not">not</link>
-            </member>
-            <member>
-                <link linkend="find">find</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/elementary_functions/help/pt_BR/and.xml b/scilab/modules/elementary_functions/help/pt_BR/and.xml
deleted file mode 100644 (file)
index 48d1a3d..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: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="and" xml:lang="en">
-    <refnamediv>
-        <refname>and</refname>
-        <refpurpose>(&amp;) "E" lógico</refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>b=and(A), b=and(A,'*')
-            b=and(A,'r'), b=and(A,1)
-            b=and(A,'c'), b=and(A,2)
-            A&amp;B
-        </synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Descrição</title>
-        <para>
-            <literal>and(A)</literal> é o "E" lógico dos elementos da matriz de
-            valores booleanos <literal>A</literal>. <literal>and(A)</literal> retorna
-            <literal>%T</literal> ("true") ("verdadeiro") se, e só se, todas as
-            entradas de <literal>A</literal> são <literal>%T</literal>.
-        </para>
-        <para>
-            <literal>y=and(A,'r')</literal> (ou, de modo equivalente,
-            <literal>y=and(A,1)</literal>) é o "e" em relação às linhas. Retorna, em
-            cada entrada do vetor linha <literal>y</literal> , o "e" das linhas de
-            <literal>x</literal> (O "e" é realizado no índice de linhas :
-            <literal>y(j)= and(A(i,j),i=1,m)</literal>).
-        </para>
-        <para>
-            <literal>y=and(A,'c')</literal> (ou, de modo equivalente,
-            <literal>y=and(A,2)</literal>) é o "e" em relação às colunas. Retorna, em
-            cada entrada do vetor coluna <literal>y</literal> , o "e" das colunas de
-            <literal>x</literal> (O "e" é realizado no índice de colunas:
-            <literal>y(i)= and(A(i,j),j=1,n)</literal>)).
-        </para>
-        <para>
-            <literal>A&amp;B</literal> fornece o <literal>and</literal> elemento
-            a elemento das matrizes de valores booleanos <literal>A</literal> e
-            <literal>B</literal> .<literal>A</literal> e <literal>B</literal> devem
-            ser matrizes com mesmas dimensões ou uma delas deve ser um único
-            booleano.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>Ver Também</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="not">not</link>
-            </member>
-            <member>
-                <link linkend="or">or</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/elementary_functions/help/pt_BR/or.xml b/scilab/modules/elementary_functions/help/pt_BR/or.xml
deleted file mode 100644 (file)
index 28d5976..0000000
+++ /dev/null
@@ -1,82 +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: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="or" xml:lang="en">
-    <refnamediv>
-        <refname>or</refname>
-        <refpurpose>(|) ou lógico</refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>or(A), or(A,'*')
-            or(A,'r'), or(A,1)
-            
-            or(A,'c'), or(A,2)
-            A|B
-        </synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Descrição</title>
-        <para>
-            <literal>or(A)</literal> fornece o <literal>or</literal> dos
-            elementos da matriz de valores booleanos <literal>A</literal>.
-            <literal>or(A)</literal> é verdadeira (<literal>%t</literal>) se, e só se,
-            pelo menos uma entrada de <literal>A</literal> é
-            <literal>%t</literal>.
-        </para>
-        <para>
-            <literal>y=or(A,'r')</literal> (ou, equivalentemente,
-            <literal>y=or(A,1)</literal>) é o or linha a linha. Retorna em cada
-            entrada do vetor linha <literal>y</literal> o "or" das linhas de
-            <literal>x</literal> (o "or" é realizado no índice de linhas :
-            <literal>y(j)= or(A(i,j),i=1,m)</literal>).
-        </para>
-        <para>
-            <literal>y=or(A,'c')</literal> (ou, equivalentemente,
-            <literal>y=or(A,2)</literal>) é o or coluna-a-coluna. Retorna em cada
-            entrada do vetor-coluna <literal>y</literal> o "or" das colunas de
-            <literal>x</literal> (o "or" é realizado no índice de colunas :
-            <literal>y(i)= or(A(i,j),j=1,n)</literal>)).
-        </para>
-        <para>
-            <literal>A|B</literal> fornece o <literal>or</literal> elemento a
-            elemento das matrizes <literal>A</literal> e <literal>B</literal>
-            .<literal>A</literal> e <literal>B</literal> devem ser matrizes de mesmas
-            dimensões ou uma delas deve ser um único booleano.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Exemplos</title>
-        <programlisting role="example"><![CDATA[ 
-or([%t %t %f])
-[%t %t %f]|[%f %t %t]
-[%t %t %f]|%f
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Ver Também</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="and">and</link>
-            </member>
-            <member>
-                <link linkend="not">not</link>
-            </member>
-            <member>
-                <link linkend="find">find</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/elementary_functions/help/ru_RU/and.xml b/scilab/modules/elementary_functions/help/ru_RU/and.xml
deleted file mode 100644 (file)
index 04f47d5..0000000
+++ /dev/null
@@ -1,88 +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="and" xml:lang="ru">
-    <refnamediv>
-        <refname>and</refname>
-        <refpurpose>логическое И элементов массива</refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Последовательность вызова</title>
-        <synopsis>b=and(A), b=and(A,'*')
-            b=and(A,'r'), b=and(A,1)
-            b=and(A,'c'), b=and(A,2)
-        </synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Описание</title>
-        <para>
-            <literal>and(A)</literal> является логическим И элементов матрицы логических значений  <literal>A</literal>. <literal>and(A)</literal> возвращает 
-            <literal>%T</literal> ("истина"), если все элементы <literal>A</literal> равны
-            <literal>%T</literal>.
-        </para>
-        <para>
-            <literal>and([])</literal> возвращает <literal>%T</literal>.
-        </para>
-        <para>
-            <literal>y=and(A,'r')</literal> (или, эквивалентно,
-            <literal>y=and(A,1)</literal>) - построчное И. Возвращает в каждом элементе вектора-строки
-            <literal>y</literal> результат операции И строк <literal>x</literal>. (Операция И выполняется по индексам строк:
-            <literal>y(j)= and(A(i,j),i=1,m)</literal>).
-        </para>
-        <para>
-            <literal>y=and(A,'c')</literal> (или, эквивалентно,
-            <literal>y=and(A,2)</literal>) является постолбцовым логическим И. 
-            Возвращает в каждом элементе вектора-столбца <literal>y</literal> 
-            результат операции И столбцов <literal>x</literal>. (Операция И выполняется по индексам
-            столбцов:
-            <literal>y(i)= and(A(i,j),j=1,n)</literal>)).
-        </para>
-    </refsection>
-    <refsection>
-        <title>Примеры</title>
-        <programlisting role="example"><![CDATA[
-A = [];
-and(A)
-
-A = %T(ones(1, 3));
-and(A)
-
-A = %F(ones(1, 3));
-and(A)
-
-A = %T(ones(1, 3));
-and(A, '*')
-and(A, 'c')
-and(A, 2)
-and(A, 'r')
-and(A, 1)
-
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Смотрите также</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="not">not</link>
-            </member>
-            <member>
-                <link linkend="and_op">and operator (&amp;) </link>
-            </member>
-            <member>
-                <link linkend="or">or</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/elementary_functions/help/ru_RU/or.xml b/scilab/modules/elementary_functions/help/ru_RU/or.xml
deleted file mode 100644 (file)
index 5983487..0000000
+++ /dev/null
@@ -1,82 +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="or" xml:lang="ru">
-    <refnamediv>
-        <refname>or</refname>
-        <refpurpose>
-            логическое ИЛИ элементов массива
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Последовательность вызова</title>
-        <synopsis>
-            or(A), or(A,'*')
-            or(A,'r'), or(A,1)
-            
-            or(A,'c'), or(A,2)
-        </synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Описание</title>
-        <para>
-            <literal>or(A)</literal> выполняет логическое ИЛИ элементов матрицы логических 
-            значений <literal>A</literal>. Результат <literal>or(A)</literal> равен 
-            "истине" (<literal>%t</literal>), если хотя бы один элемент 
-            <literal>A</literal> равен <literal>%t</literal>.
-        </para>
-        <para>
-            <literal>or([])</literal> возвращает <literal>%F</literal>.
-        </para>
-        <para>
-            <literal>y=or(A,'r')</literal> (или, эквивалентно,
-            <literal>y=or(A,1)</literal>) является построчным ИЛИ. Оно возвращает в 
-            каждом элементе вектора-строки <literal>y</literal> результат операции ИЛИ 
-            строк <literal>x</literal>. Операция ИЛИ выполняется по индексам строк:
-            <literal>y(j)= or(A(i,j),i=1,m)</literal>.
-        </para>
-        <para>
-            <literal>y=or(A,'c')</literal> (или, эквивалентно,
-            <literal>y=or(A,2)</literal>) является постолбцовым ИЛИ. Оно возвращает в
-            каждом  элементе вектора-столбца <literal>y</literal> результат операции ИЛИ 
-            столбцов <literal>x</literal>. Операция ИЛИ выполняется по индексам столбцов: 
-            <literal>y(i)= or(A(i,j),j=1,n)</literal>. 
-        </para>
-        <para/>
-    </refsection>
-    <refsection>
-        <title>Примеры</title>
-        <programlisting role="example"><![CDATA[ 
-or([%t %t %f])
- ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>Смотрите также</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="or_op">or operator (|)</link>
-            </member>
-            <member>
-                <link linkend="and">and</link>
-            </member>
-            <member>
-                <link linkend="not">not</link>
-            </member>
-            <member>
-                <link linkend="find">find</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>