What is the default random number generation algorithm for 2018b Matlab? ( with randn(1,1) command)
2 views (last 30 days)
Show older comments
Could somebody tell what is the default RNG algorithm for 2018b Matlab?
I generate with this code below ( not using RandStream, etc..):
randn(1,1)
Thanks!
0 Comments
Accepted Answer
Walter Roberson
on 19 Sep 2022
mt19937ar with a Ziggaurat transform is used for randn() these days.
3 Comments
Walter Roberson
on 19 Sep 2022
The rng page says that 'default' initializes twister. Then slightly further down in the description of generator keyword it lists twister and says the generator keyword is mt19937ar .
The RandStream documentation lists the available transforms for randn. And see https://blogs.mathworks.com/cleve/2015/05/18/the-ziggurat-random-normal-generator/
More Answers (0)
See Also
Categories
Find more on Random Number Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!