13
13
<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" version="5.0-subset Scilab" xml:id="or" xml:lang="en">
16
<refpurpose>logical OR of the elements of an array</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>or(A), or(A,'*')
27
<title>Description</title>
29
<literal>or(A)</literal> gives the <literal>or</literal> of the
30
elements of the boolean matrix <literal>A</literal>.
31
<literal>or(A)</literal> is true (<literal>%t</literal>) if at least one
32
entry of <literal>A</literal> is <literal>%t</literal>.
35
<literal>or([])</literal> returns <literal>%F</literal>.
38
<literal>y=or(A,'r')</literal> (or, equivalently,
39
<literal>y=or(A,1)</literal>) is the row-wise OR. It returns in each entry
40
of the row vector <literal>y</literal> the OR of the rows of
41
<literal>x</literal> (The OR is performed on the row index :
42
<literal>y(j)= or(A(i,j),i=1,m)</literal>).
45
<literal>y=or(A,'c')</literal> (or, equivalently,
46
<literal>y=or(A,2)</literal>) is the column-wise OR. It returns in each
47
entry of the column vector <literal>y</literal> the OR of the columns of
48
<literal>x</literal> (The OR is performed on the column index:
49
<literal>y(i)= or(A(i,j),j=1,n)</literal>)).
54
<title>Examples</title>
55
<programlisting role="example"><![CDATA[
16
<refpurpose>logical OR of the elements of an array</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>or(A), or(A,'*')
27
<title>Description</title>
29
<literal>or(A)</literal> gives the <literal>or</literal> of the
30
elements of the boolean matrix <literal>A</literal>.
31
<literal>or(A)</literal> is true (<literal>%t</literal>) if at least one
32
entry of <literal>A</literal> is <literal>%t</literal>.
35
<literal>or([])</literal> returns <literal>%F</literal>.
38
<literal>y=or(A,'r')</literal> (or, equivalently,
39
<literal>y=or(A,1)</literal>) is the row-wise OR. It returns in each entry
40
of the row vector <literal>y</literal> the OR of the rows of
41
<literal>x</literal> (The OR is performed on the row index :
42
<literal>y(j)= or(A(i,j),i=1,m)</literal>).
45
<literal>y=or(A,'c')</literal> (or, equivalently,
46
<literal>y=or(A,2)</literal>) is the column-wise OR. It returns in each
47
entry of the column vector <literal>y</literal> the OR of the columns of
48
<literal>x</literal> (The OR is performed on the column index:
49
<literal>y(i)= or(A(i,j),j=1,n)</literal>)).
54
<title>Examples</title>
55
<programlisting role="example"><![CDATA[
57
57
]]></programlisting>
59
<refsection role="see also">
60
<title>See Also</title>
61
<simplelist type="inline">
63
<link linkend="or_op">or operator (|)</link>
66
<link linkend="and">and</link>
69
<link linkend="not">not</link>
72
<link linkend="find">find</link>
59
<refsection role="see also">
60
<title>See Also</title>
61
<simplelist type="inline">
63
<link linkend="or_op">or operator (|)</link>
66
<link linkend="and">and</link>
69
<link linkend="not">not</link>
72
<link linkend="find">find</link>