Qurak

RandomSample

可用

Random selection without replacement.

RandomSample[{e1, e2, …}, n]
RandomSample[{w1, w2, …} -> {e1, e2, …}, n]
RandomSample[{e1, e2, …}]
Length[RandomSample[{a, b, c}]] → 3RandomSample[{1, 2}, 5] → RandomSample::smplen: RandomSample cannot generate a sample of length 5, which is greater than the length of the sample set {1, 2}. If you want a choice of possibly repeated elements from the set, use RandomChoice. RandomSample[{1, 2}, 5]

主題

相關

全部 6300 個函式 · 從 MCP 用戶端使用這個