MATLAB で乱数発生のシードを​定義するにはどのよう​に記述しますか?

13 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 25 de Oct. de 2013
Editada: MathWorks Support Team el 10 de Oct. de 2025
MATLAB 7.7 (R2008b) での乱数発生のシードの定義
rand('seed',34)
を、MATLAB 7.8(R2009a) で設定する方法を教えてください。

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 10 de Oct. de 2025
Editada: MathWorks Support Team el 10 de Oct. de 2025
"rand('seed',34);" のような記述方法は MATLAB 7.7(R2008b) までの記述方法で、MATLAB 7.8(R2009a)以降は下記のように記述します。
RandStream.setDefaultStream (RandStream('mcg16807','seed',34))
- 乱数発生器アルゴリズム (MATLAB ユーザーガイド)

Más respuestas (0)

Categorías

Más información sobre 乱数発生器 en Help Center y File Exchange.

Productos


Versión

R2010a

Community Treasure Hunt

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

Start Hunting!