|
RANDOM COMPOSITIONName:
The number of compositions is given by
This command generates a single random composition. The output is an array of size k.
where <k> is a number or parameter that specifies the size of the composition; and <y> is a variable where the random composition is saved. This command must be preceeded with the command
LET K = 3 LET Y = RANDOM COMPOSITION FOR I = 1 1 K
The SEED command can be used to specify a seed for the random number generator.
LET N = 8 LET K = 3 LET Y = RANDOM COMPOSITION FOR I = 1 1 K PRINT Y
Date created: 1/12/2009 |