Difference between revisions of "Shuffle Command"
From GeoGebra Manual
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=4.0}}</noinclude> | <noinclude>{{Manual Page|version=4.0}}</noinclude> | ||
{{command|statistics}} | {{command|statistics}} | ||
− | ;Shuffle[ List L] | + | ;Shuffle[ <List L> ] |
:Returns list with same elements as ''L'', but in random order. | :Returns list with same elements as ''L'', but in random order. | ||
− | {{note|You can recompute the list via ''Recompute all objects'' in [[View Menu]] (or pressing {{KeyCode|F9}}).}} | + | :{{note|You can recompute the list via ''Recompute all objects'' in [[View Menu]] (or pressing {{KeyCode|F9}}).}} |
See also [[RandomElement Command]] and [[RandomBetween Command]]. | See also [[RandomElement Command]] and [[RandomBetween Command]]. | ||
==CAS Syntax== | ==CAS Syntax== | ||
− | ;Shuffle[ <List L>] | + | ;Shuffle[ <List L> ] |
:Returns list with same elements as ''L'', but in random order. | :Returns list with same elements as ''L'', but in random order. | ||
:{{example|1=<div><code><nowiki>Shuffle[{3, 5, 1, 7, 3}]</nowiki></code> yields for example ''{5, 1, 3, 3, 7}''.</div>}} | :{{example|1=<div><code><nowiki>Shuffle[{3, 5, 1, 7, 3}]</nowiki></code> yields for example ''{5, 1, 3, 3, 7}''.</div>}} |
Revision as of 10:30, 25 August 2011
- Shuffle[ <List L> ]
- Returns list with same elements as L, but in random order.
- Note: You can recompute the list via Recompute all objects in View Menu (or pressing F9).
See also RandomElement Command and RandomBetween Command.
CAS Syntax
- Shuffle[ <List L> ]
- Returns list with same elements as L, but in random order.
- Example:
Shuffle[{3, 5, 1, 7, 3}]
yields for example {5, 1, 3, 3, 7}.