randUniformly distributed pseudo-random number
randrand(n)n-by-n matrix of uniformly distributed pseudo-random number taken from the interval n should be a real, non-negative integer scalar. If n is zero, it returns an empty array.rand(s1,s2,...,sN)[s1, s2, ..., sN], containing uniformly distributed pseudo-random numbers taken from the interval s1, s2, ..., sN should be real, non-negative integer scalars. If one of s1, s2, ..., sN is zero, it returns an empty array.rand(sizeVec)sizeVec.sizeVec should contain real, non-negative integers. If an element of sizeVec is zero, it returns an empty array.r1 = rand(3, 4, 5);
size(r1)
r2 = rand([3 4 5]);
size(r2)
% Output
ans =
3.0000 4.0000 5.0000
ans =
3.0000 4.0000 5.0000