GEN40

GEN40 — Generates a random distribution using a distribution histogram.

Description

Generates a continuous random distribution function starting from the shape of a user-defined distribution histogram.

Syntax

f # time size 40 shapetab

Performance

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.

Histogram shape can be generated with any other GEN routines. Since no interpolation is used when GEN40 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).

This subroutine is designed to be used together with cuserrnd opcode (see cuserrnd for more information).

Credits

Author: Gabriel Maldonado