random (replaces TRandom)
The random function returns a 1-dimensional array containing random numbers distributed according to a uniform probability density function.
tbl = random( nCount )
tbl = random( nCount, nMin, nMax )
    nCount is the number of random numbers.
    nCount is the number of random numbers in
the range [ nMin, nMax ]. if omitted, the random numbers are
created in the range [0, ..., 1 ].
    tbl is a 1-dimensional array containing
nCount
values, starting at index [1].
    On
failure, nil is
returned.
The following script creates 1 million random numbers, creates a histogram of the values, and plots their histogram.
| 
 | 
 -- create 1 million random deviates  | 
| 
 | 
 -- create a Histogram object  | 
| 
 | 
 -- compute the histogram  | 
| 
 | 
 -- plot the histogram  | 
| 
 | 
 
  | 
Table and Array Functions, gaussdev, CStats class
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.