|
IDL Analyst Reference Guide: Random Number Generation |
|
The IMSL_CONT_TABLE procedure sets up table to generate pseudorandom numbers from a general continuous distribution.
| Note This routine requires an IDL Analyst license. For more information, contact your ITT Visual Information Solutions sales or technical support representative. |
IMSL_CONT_TABLE, ( f, iopt, ndata, table [, /DOUBLE] )
A scalar string specifying a user-supplied function to compute the cumulative distribution function. The argument to the function is the point at which the distribution function is to be evaluated.
Indicator of the extent to which table is initialized prior to calling IMSL_CONT_TABLE.
Number of points at which the CDF is evaluated for interpolation. ndata must be greater than or equal to 4.
ndata by 5 table to be used for interpolation of the cumulative distribution function. The first column of table contains abscissas of the cumulative distribution function in ascending order, the second column contains the values of the CDF (which must be strictly increasing), and the remaining columns contain values used in interpolation. The first row of table corresponds to the left limit of the support of the distribution and the last row corresponds to the right limit of the support; that is, table (0, 1) = 0.0 and table(ndata – 1, 1) = 1.0.
If present and nonzero, double precision is used.
IMSL_CONT_TABLE sets up a table that IMSL_RAND_GEN_CONT can use to generate pseudorandom deviates from a continuous distribution. The distribution is specified by its cumulative distribution function, which can be supplied either in tabular form in table or by a function f. See the documentation for the routine RAND_GEN_CONT for a description of the method.
For an example of using IMSL_CONT_TABLE see the example for IMSL_RAND_GEN_CONT.
IDL Online Help (March 06, 2007)