powered by
rand(n = 1, m = n) randn(n = 1, m = n) randi(imax, n = 1, m = n)
n x m
n
rand()
randn()
randi()
m
rand() uses the uniform distribution on ]0, 1[, while randn() uses the normal distribution with mean 0 and standard deviation 1.
]0, 1[
randi() generates integers between imax[1] and imax[2] resp. 1 and imax, if imax is a scalar.
imax[1]
imax[2]
imax
set.seed
rand(3) randn(1, 5) randi(c(1,6), 1, 10)
Run the code above in your browser using DataLab