Sample 指令

来自GeoGebra Manual
跳转至: 导航搜索
Accessories dictionary.png
本页为官方文件,一般使用者无法修改,若有任何误谬,请与官方联络。如欲编辑,请至本页的开放版


Sample[ <List>, <Size> ]
UnderConstruction.png
目前本页中文说明尚未翻译完成,请先连至英文说明。如果您有权限,请帮忙翻译本页的官方手册
Sample[ <List>, <Size>, <With Replacement> ]
UnderConstruction.png
目前本页中文说明尚未翻译完成,请先连至英文说明。如果您有权限,请帮忙翻译本页的官方手册

CAS 视窗

Sample[ <List>, <Size> ]
UnderConstruction.png
目前本页中文说明尚未翻译完成,请先连至英文说明。如果您有权限,请帮忙翻译本页的官方手册
Sample[ <List>, <Size>, <With Replacement> ]
UnderConstruction.png
目前本页中文说明尚未翻译完成,请先连至英文说明。如果您有权限,请帮忙翻译本页的官方手册
Sample[ <List L>, <Size n> ]
Returns list of n randomly chosen elements of L; elements can be chosen several times.
范例:
Sample[{1, 2, 3, 4, 5}, 5] yields for example {1, 2, 1, 5, 4}.
Sample[ <List L>, <Size n>, <Boolean for replacement> ]
Returns list of n randomly chosen elements of L. Elements can be chosen several times if and only if the last parameter is true.
范例:
Sample[{1, 2, 3, 4, 5}, 5, true] yields for example {2, 3, 3, 4, 5}.

CAS Syntax

Sample[ <List L>, <Size n> ]
Returns list of n randomly chosen elements of L; elements can be chosen several times.
范例:
Sample[{-5, 2, a, 7, c}, 3] yields for example {a, 7, -5}.
Sample[ <List L>, <Size n>, <Boolean for replacement> ]
Returns list of n randomly chosen elements of L. Elements can be chosen several times if and only if the last parameter is true.
范例:
The list can include lists as well: Let List1 be {1, 2, 3}.
Sample[{List1, 4, 5, 6, 7, 8}, 3, false] yields for example {6, {1, 2, 3}, 4}.
© 2024 International GeoGebra Institute