Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: randomnumbers.erlang - Function Up: randomnumbers - Tool Previous: randomnumbers.binomial - Function


randomnumbers.discreteuniform - Function



Package utility
Module mathematics
Tool randomnumbers


Generate uniformly distributed random integers


Synopsis
discreteuniform(low, high, shape)


Description
The discreteuniform function will generate integers that are uniformly distributed between the specified lower and upper bounds. Both the lower and upper bound are included in the range. See the general tool description for a more mathematical definition of the point probabilities.

The lower and upper bounds can be any integer and the lower bound cannot be larger than the upper bound. The result will be integers in the range low  $ \leq$ x $ \leq$ high. 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.



Arguments

low in Lower bound
    Allowed: integer
    Default: -1
high in Upper bound
    Allowed: integer
    Default: 1
shape in Shape of the output array
    Allowed: integer or a vector of integers
    Default: 1


Returns
An integer scalar or array.



Example
See the example for the randomnumbers constructor.



next up previous contents index
Next: randomnumbers.erlang - Function Up: randomnumbers - Tool Previous: randomnumbers.binomial - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15