<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="GEN40">
  <refmeta>
    <refentrytitle>GEN40</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>GEN40</refname>
    <refpurpose>
      Generates a random distribution using a distribution histogram.
      <indexterm id="IndexGEN40"><primary>GEN40</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      Generates a continuous random distribution function starting from the shape of a user-defined distribution histogram.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis><command>f</command> # time size -40 shapetab</synopsis>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      The shape of histogram must be stored in a previously defined table, in fact shapetab argument must be filled with the number of such table.
    </para>

    <para>
      Histogram shape can be generated with any other GEN routines. Since no interpolation is used when <link linkend="GEN40">GEN40</link> processes the translation, it is suggested that the size of the table containing the histogram shape to be reasonably big, in order to obtain more precision (however after the processing the shaping-table can be destroyed in order to re-gain memory).
    </para>

    <para>
      This subroutine is designed to be used together with cuserrnd opcode (see <link linkend="cuserrnd">cuserrnd</link> for more information).
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Author: &namegabriel;</para>
  </refsect1>
</refentry>
