What random number generators are used by various version of MATLAB up to MATLAB 7.5 (R2007b)?

4 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 4 Mar 2011
Throughout time MATLAB has used several different random number generators. Users should typically consider using the default generator, since it is optimal in a number of considerations, unless there is a compelling reason to use another generator.
The uniform random number generator can generate numbers according to the following algorithms:
1. Mersenne Twister algorithm by Nishimura and Matsumoto (the default in MATLAB 7.4 and later)
2. Modified version of Marsaglia's subtract with borrow algorithm (the default in MATLAB 5 through MATLAB 7.3)
3. Multiplicative congruential algorithm (the default in MATLAB 4)
To read more about these algorithms, consult the references mentioned in the documentation. This documentation can be opened from the MATLAB Command Prompt by entering:
doc rand
The normal random number generator can generate numbers according to the following algorithms:
1. Marsaglia's ziggurat algorithm (default in MATLAB 5 and later)
2. Polar algorithm (the default in MATLAB 4)
To read more about these algorithms, consult the references mentioned in the documentation. This documentation can be opened from the MATLAB command prompt by entering
doc randn

More Answers (0)

Categories

Find more on Random Number Generation in Help Center and File Exchange

Tags

No tags entered yet.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!