85ac5e4fe2c1dea6fa38509a61588025a299e9c7
[scilab.git] / scilab / modules / elementary_functions / help / en_US / discrete / primes.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
19           xmlns:scilab="http://www.scilab.org" xml:id="primes" xml:lang="en">
20     <refnamediv>
21         <refname>primes</refname>
22         <refpurpose>primes function</refpurpose>
23     </refnamediv>
24     <refsynopsisdiv>
25         <title>Syntax</title>
26         <synopsis>[y]=primes(x)</synopsis>
27     </refsynopsisdiv>
28     <refsection>
29         <title>Arguments</title>
30         <variablelist>
31             <varlistentry>
32                 <term>x</term>
33                 <listitem>
34                     <para>real scalar</para>
35                 </listitem>
36             </varlistentry>
37             <varlistentry>
38                 <term>y</term>
39                 <listitem>
40                     <para>vector</para>
41                 </listitem>
42             </varlistentry>
43         </variablelist>
44     </refsection>
45     <refsection>
46         <title>Description</title>
47         <para>
48             Given a real <literal>x</literal>, <literal>primes(x)</literal>
49             returns in a vector <literal>y</literal> all the primes numbers included
50             between 1 and <literal>x</literal>. If <literal>x&lt;2</literal> then
51             <literal>primes(x)</literal> returns an empty matrix.
52         </para>
53     </refsection>
54     <refsection>
55         <title>Examples</title>
56         <programlisting role="example"><![CDATA[
57 x=35
58 y=primes(x)
59  ]]></programlisting>
60     </refsection>
61     <refsection role="see also">
62         <title>See also</title>
63         <simplelist type="inline">
64             <member>
65                 <link linkend="factor">factor</link>
66             </member>
67         </simplelist>
68     </refsection>
69 </refentry>