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...

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fortran with MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by