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

8 vues (au cours des 30 derniers jours)
MathWorks Support Team
MathWorks Support Team le 25 Oct 2013
MATLAB 7.7 (R2008b) での乱数発生のシードの定義
rand('seed',34)
を、MATLAB 7.8(R2009a) で設定する方法を教えてください。

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur 乱数発生器 dans Help Center et File Exchange

Produits


Version

R2010a

Community Treasure Hunt

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

Start Hunting!