random number generation: MATLAB vs Fortran

2 ビュー (過去 30 日間)
Hsinho
Hsinho 2012 年 8 月 16 日
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
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
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...
  1 件のコメント
Hsinho
Hsinho 2012 年 8 月 17 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFortran with MATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by