gen20 - fill a function table with random numbers
makegen(table_number, 20, table_size, distribution_type
[, seed [, min, max ]])
Call makegen from a script with a function_type of 20 to
fill a function table with random numbers using any of several different
distribution types. You can also specify a seed and a range within
which the numbers fall.
NOTE: Much of the functionality of gen 20 has been
duplicated and extended by the
"random"
table-type in
maketable
and the new (in RTcmix 4.0) table-handle scheme.
- table_number
-
The numeric ID for the function table.
Unlike other gens, gen 20 never rescales the table to fit between -1 and 1.
- table_size
-
The size of the function table: how many values it stores.
- distribution_type
-
A code indicating the type of random distribution to use:
-
even distribution
-
low-weighted linear distribution
-
high-weighted linear distribution
-
triangular distribution weighted towards 0.5
-
gaussian distribution, with mean of 0.5 and standard deviation of 0.166666
-
cauchy distribution, with mean of 0.5 and alpha of 0.00628338
- seed
-
The seed for the random number generator. If seed is zero, then
the seed comes from the microsecond clock, otherwise seed is used
as the seed. If there is no seed argument, the seed used is 1.
- min
-
- max
-
Define the range (inclusive) for the random numbers. Both arguments
must be present, otherwise the range is from 0 to 1.
makegen(1, 20, 30, 0, 1, -2, 5)
uses an even distribution and a seed of 1 to generate 30 random numbers
between -2 and 5.

R. Luke Dubois, with additions by John Gibson. The random distribution
equations were adapted from Dodge and Jerse.
makegen