RandomTools Flavor: choose - describe a flavor which chooses from a collection
|
Calling Sequence
|
|
choose(collection)
|
|
Parameters
|
|
collection
|
-
|
set, list, Matrix, Vector, Array, or table
|
|
|
|
|
Description
|
|
•
|
The flavor choose selects one of the entries in a non-empty collection with equal probability.
|
•
|
The flavor choose cannot select an element from a non-array table that has an indexing function.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
|
|
Download Help Document
Was this information helpful?