random number generation: MATLAB vs Fortran
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I am a MATLAB user.
I am curious about the difference of random number generation in MATLAB and Fortran.
I know from Help file that MATLAB use "Mersenne twister" as the generator with an approximate period,2^19936-1.
I have no idea about Fortran. Do both use the same best random number generator?
1 个评论
Peter Perkins
2012-8-17
MATLAB has several choices of generator. The Mersenne Twister (mt19937ar, to be specific) is the default that MATLAB sets up at start-up, but you are free to choose any of the others at any time. See the documentation for the RNG function.
采纳的回答
Matt Fig
2012-8-16
Fortran 95 is listed having an implementation of the Mersenne algorithm available for use.
As this algorithm was developed in 1997 I don't think Fortran 90 would have it...
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fortran with MATLAB 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!