Update: 29-Aug-2016 Sven and Sam are correct. This the first number returned by the rand function in a given session, assuming no other calls to related random number functions (such as randn) have been made. For more information about this number and about random number generation in general, see Chapter 9 of Cleve Moler's book Numerical Computing with MATLAB. Mikhail, the initial state used by MATLAB is the same initial state used in genrand_int32 in the reference implementation.
Comments are closed.
4 CommentsOldest to Newest
It’s a long shot, but it seems pretty rand()om to me ;)
The first random number returned in a new MATLAB session or rng(‘default’)!
That’s a fairly easy question for anyone who can Google, because the answer comes up in the first result.
A more interesting question is why MathWorks have chosen this number to initialize their pseudo-random number generator?
Sven, Sam, Mikhail—Thanks for your comments. See my update in the blog post above.