RandomTools
Generate
generate a particular random object
Calling Sequence
Parameters
Description
Examples
Generate(expr)
expr
-
expression; defines the form of the random object
The Generate(expr) function generates a particular random object that is determined by expr. The expr parameter is used to:
* indicate a particular Maple type,
* indicate a flavor template, where specific keywords describe the form of the returned random object, or
* choose a random entry from a Maple data structure.
The following list describes the Maple types, flavor templates, and data structures that are recognized by Generate. For more information about how to generate a random number that corresponds to one of these items, see the corresponding help page (RandomTools/flavor/<topic>).
choose
complex
distribution
exprseq
float
identical
integer
list
listlist
Matrix
negative
negint
nonnegative
nonnegint
nonposint
nonpositive
nonzero
nonzeroint
polynom
posint
positive
rational
set
string
structured
truefalse
variable
Vector
The Generate function calls the Maple rand procedure.
The Generate function maps onto all objects that are not of type atomic.
This function is part of the RandomTools package, and so it can be used in the form Generate(..) only after executing the command with(RandomTools). However, it can always be accessed through the long form of the command by using the form RandomTools[Generate](..).
with⁡RandomTools:
Generate⁡integer
−104281139460
Generate⁡list⁡float,3
0.2342493224,0.1799302829,0.5137385362
Generate⁡negint,integer,float
−65655460113,−113591692544,0.2907448089
Matrix⁡3,3,Generate⁡rational⁡denominator=10,makeproc=true
110910254512−1502515
−11031035−910−2531025−310−310
Vector⁡4,Generate⁡complex⁡integer⁡range=1..100,makeproc=true
67+78⁢I51+53⁢I12+19⁢I63+40⁢I
See Also
LinearAlgebra[RandomMatrix]
LinearAlgebra[RandomVector]
makeproc
rand
randpoly
type/atomic
Download Help Document