Array of random integers
returns a size1-by-...-by-sizeN
distributed matrix with random integer values in the range
R
= randi(imax
,size1,...,sizeN
)[1,imax]
.
size1-by-...-by-sizeN are
separated arguments that indicates the size of each dimension of the
generated matrix.
returns a size1-by-...-by-sizeN matrix
with underlying class of double, random integer values in the range
R
= randi(imax
,size1,...,sizeN
,arraytype
)[1,imax]
, and the type specified by
arraytype
.
returns a size1-by-...-by-sizeN matrix
with underlying class of R
= randi(imax
,size1,...,sizeN
,datatype
,arraytype
)datatype
, random integer values
in the range [1,imax]
, and the type specified by
arraytype
.
returns a size1-by-...-by-sizeN array
with random integer values in the range R
= randi(imax
,size1,...,sizeN
,'like',P
)[1,imax]
and the
same type and underlying class (data type) as the prototype array,
P
.
returns a size1-by-...-by-sizeN array
with random integer values in the range R
= randi(imax
,size1,...,sizeN
,datatype
,'like',P
)[1,imax]
, the
specified underlying class (datatype
), and the same type
as the prototype array, P
.
returns an n-by-n codistributed array
with random integer values in the range C
= randi(imax
,n
,codist
)[1,imax]
and
underlying class of double. The codistributor object
codist
specifies the distribution scheme for creating
the codistributed array. For information on constructing codistributor
objects, see the reference pages for codistributor1d
and
codistributor2dbc
.
returns a size1-by-...-by-sizeN
codistributed array with random integer values in the range
C
= randi(imax
,size1,...,sizeN
,codist
)[1,imax]
and underlying class of double.
returns an n-by-n codistributed array
with random integer values in the range C
= randi(imax
,n
,datatype
,codist
)[1,imax]
and
underlying class of datatype
. The codistributor object
codist
specifies the distribution scheme for creating
the codistributed array. For information on constructing codistributor
objects, see the reference pages for codistributor1d
and
codistributor2dbc
.
returns a size1-by-...-by-sizeN
codistributed array with random integer values in the range
C
= randi(imax
,size1,...,sizeN
,datatype
,codist
)[1,imax]
and underlying class of
datatype
.