Difference between revisions of "RandomUniform Command"
From GeoGebra Manual
(new 4.4 syntax: ;RandomUniform[ <Min>, <Max>, <Number of Samples n> ]) |
|||
Line 4: | Line 4: | ||
:Returns random real number from [[w:Uniform distribution (continuous)|uniform distribution]] on interval [''min'', ''max'']. | :Returns random real number from [[w:Uniform distribution (continuous)|uniform distribution]] on interval [''min'', ''max'']. | ||
:{{Example|1=<div><code><nowiki>RandomUniform[0, 1]</nowiki></code> returns a random number between ''0'' and ''1''</div>}} | :{{Example|1=<div><code><nowiki>RandomUniform[0, 1]</nowiki></code> returns a random number between ''0'' and ''1''</div>}} | ||
+ | ;RandomUniform[ <Min>, <Max>, <Number of Samples n> ] | ||
+ | :Returns a list of ''n'' random real numbers from [[w:Uniform distribution (continuous)|uniform distribution]] on interval [''min'', ''max'']. | ||
==CAS Syntax== | ==CAS Syntax== | ||
;RandomUniform[ <Min>, <Max> ] | ;RandomUniform[ <Min>, <Max> ] |
Revision as of 00:02, 29 December 2013
- RandomUniform[ <Min>, <Max> ]
- Returns random real number from uniform distribution on interval [min, max].
- Example:
RandomUniform[0, 1]
returns a random number between 0 and 1
- RandomUniform[ <Min>, <Max>, <Number of Samples n> ]
- Returns a list of n random real numbers from uniform distribution on interval [min, max].
CAS Syntax
- RandomUniform[ <Min>, <Max> ]
- Returns random real number from uniform distribution on interval [min, max].
- Example:
RandomUniform[0, 1]
returns a random number between 0 and 1
Note:
RandomUniform[0,1]
is equivalent to random()
(see Predefined Functions and Operators). Note: See also SetSeed, RandomBetween, RandomElement, RandomBinomial, RandomNormal , RandomPoisson commands.