IMSL_CONT_TABLE
Syntax | Arguments | Keywords | Discussion | Example | Version History
The IMSL_CONT_TABLE procedure sets up table to generate pseudorandom numbers from a general continuous distribution.
Note
This routine requires an IDL Advanced Math and Stats license. For more information, contact your ITT Visual Information Solutions sales or technical support representative.
Syntax
IMSL_CONT_TABLE, ( f, iopt, ndata, table [, /DOUBLE] )
Arguments
f
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.
iopt
Indicator of the extent to which table is initialized prior to calling IMSL_CONT_TABLE.
- 0—IMSL_CONT_TABLE fills the last four columns of table. Input the points at which the CDF is to be evaluated in the first column of table. These must be in ascending order.
- 1—IMSL_CONT_TABLE fills the last three columns of table. The supplied function f is not used and may be a dummy function; instead, the cumulative distribution function is specified in the first two columns of table. The abscissas (in the first column) must be in ascending order and the function must be strictly monotonically increasing.
ndata
Number of points at which the CDF is evaluated for interpolation. ndata must be greater than or equal to 4.
table
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.
Keywords
DOUBLE
If present and nonzero, double precision is used.
Discussion
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.
Example
For an example of using IMSL_CONT_TABLE see the example for IMSL_RAND_GEN_CONT.
Version History