Generate a row vector containing a random sample of size n from the univariate distribution which assumes the values in v with probabilities p. n must be a scalar.
If r and c are given create a matrix with r rows and c columns. Or if sz is a vector, create a matrix of size sz.