Returns a vector with elements that are uniformly sampled from a set.
y = randsample(v, k)
y = randsample(v, k, r)
y = randsample(v, k, r, w)
Set that is uniformly sampled to form the output. v is a vector or positive integer that means the vector 1:v.
Length of the output vector.
Specifies whether each element in v can be sampled more than once.
Weights for the elements in v. w is a real vector with the same length as v. You can only specify w when r is true.
Vector with elements that are uniformly sampled from v.
V = 'National Instruments'; Y = randsample(V, 6)
Where This Node Can Run:
Desktop OS: Windows
FPGA: This product does not support FPGA devices