<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2000 - INRIA - Carlos Klimann
 * Copyright (C) 2014 - Scilab Enterprises - Pierre-Aimé Agnel
 *
 * 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:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="fr" xml:id="samwr">
    <refnamediv>
        <refname>samwr</refname>
        <refpurpose>Tirage sans remise</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Séquence d'appel</title>
        <synopsis>s = samwr(sizam,numsamp,X)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Paramètres</title>
        <variablelist>
            <varlistentry>
                <term>sizam</term>
                <listitem>
                    <para>
                        Entier. Nombre d'éléments d'un tirage. Doit être de valeur inférieure ou égale à la taille de <literal>X</literal>.
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>numsamp</term>
                <listitem>
                    <para>Entier. Nombre de tirages à effectuer.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>X</term>
                <listitem>
                    <para>Matrice. Contient la population.</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>s</term>
                <listitem>
                    <para>
                        matrice de taille <literal>sizsam * numsamp</literal>. Elle contient
                        <literal>numsamp</literal>  tirages aléatoires  (les vecteurs colonne), chacun contenant
                        <literal>sizam</literal> extractions sans remise d'éléments de <literal>X</literal>.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>Renvoie des tirages sans remises de valeurs extraites d'une matrice.</para>
    </refsection>
    <refsection>
        <title>Générateur de nombres aléatoires</title>
        <para>
             <literal>samwr</literal> se fonde sur la fonction <link linkend="grand">grand</link> pour générer les tirages aléatoires. Utiliser <literal>grand("setsd", seed)</literal> pour changer la graine aléatoire de <literal>samwr</literal>.
        </para>
        <programlisting role="example"><![CDATA[
            seed = getdate("s");
            grand("setsd", seed); //positionne la graine à la date du jour

            seed = 0;
            grand("setsd", seed); //positionne la graine à sa valeur par défaut
            ]]>
        </programlisting>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
a = [0.33 1.24 2.1 1.03]
s = samwr(4, 12, a)
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="sample">sample</link>
            </member>
            <member>
                <link linkend="samplef">samplef</link>
            </member>
            <member>
                <link linkend="grand">grand</link>
            </member>
        </simplelist>
    </refsection>
</refentry>

