| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 1556 |
|
| Package | utility | |
| Module | mathematics | |
| Tool | randomnumbers |
The mean can be any real number except zero and the variance must
be a positive number. The result will be floating point numbers in
the range
0 < x <
if the mean is positive and in the
range
-
< x < 0 if it is negative. The shape can be
either an integer or a vector of integers where all the values are
greater than zero. The default value of one will produce a scalar
output.
| mean | in | Mean of the distribution | |
| Allowed: | double | ||
| Default: | 1.0 | ||
| variance | in | Variance of the distribution | |
| Allowed: | double | ||
| Default: | 1.0 | ||
| shape | in | Shape of the output array | |
| Allowed: | integer or a vector of integers | ||
| Default: | 1 | ||
include 'randomnumbers.g'
rand := randomnumbers();
print rand.erlang(4, 8);
rand.done()
This example will print a random number from the erlang distribution.