|
SOLUTIONS
|
MATHEMATICA 内置符号
RandomChoice
RandomChoice[{e1, e2, ...}]
给出
其中之一的虚拟随机选择.
RandomChoice[list, n]
给出一列 n 虚拟随机选择.
RandomChoice[list, {n1, n2, ...}]
给出
×
×... 虚拟随机选择的排列.
RandomChoice[{w1, w2, ...}->{e1, e2, ...}]
给出一由
虚拟随机选择.
RandomChoice[wlist->elist, n]
给出一列 n 的加权选择.
RandomChoice[wlist->elist, {n1, n2, ...}]
给出一
×
×... 加权选择的排列.
更多信息更多信息
- RandomChoice[{e1, e2, ...}] 所有的
有同等可能性的选择. - 无论何时你运行Mathematica,RandomChoice 给出不同序列的虚拟随机选择. 可以从特殊值开始 SeedRandom.
- Method 选项对 SeedRandom 给出指定一虚拟随机发生器.
版本 6 的新功能
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
