MATLAB: Rand(‘state’,11)

genetic algorithm

Can anyone please explain this statement:
rand('state',11) ?!

Best Answer

rand is an obsolete random number generator that generates uniformly distributed outputs in the open interval (0,1).
rand(m,n) produces a matrix of size [m n] and rand(n) = rand(n,n)
Each time rand is called, the state of the generator is changed and a new sequence of random numbers is generated.
There are 2^1492 states, 2^32 of them are so-called integer states.
rand('state',N) for integer N in the closed interval [0 2^32-1] initializes the generator to the Nth integer state.
SEE THE DOCUMENTATION:
help rand
doc rand
Hope this helps.
Greg