randi | R Documentation |
Construct a matrix or multi-way array of uniform random integers.
randi(imax, nrow, ncol = 1, ..., atleast_2d = NULL)
imax |
A positive integer. |
nrow |
The desired number of rows. |
ncol |
The desired number of columns. |
... |
Further dimensions of the array. |
atleast_2d |
Logical indicating whether or not to force column vectors
to have a second dimension equal to one. Defaults to |
A matrix or array of pseudorandom numbers.
rand()
, randn()
, sample()
.
randi(2, 5, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.