フィルターのクリア

Failing randomization through closing matlab

2 ビュー (過去 30 日間)
Kathrin Sadus
Kathrin Sadus 2020 年 12 月 4 日
コメント済み: Ameer Hamza 2020 年 12 月 7 日
Hello everyone,
I am coding an experiment but I ran into a problem regarding the presentation of random stimuli. The experiment includes a trial list which is mostly created using the randi() function. However, everytime I close Matlab and script, the numbers will exactly the same in the next session. This does not happen if a simply leave the matlab window open and rerun the code.
Any ideas concerning the root of this problem?
Thank you in advance!
Best,
Kathrin

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 12 月 4 日
編集済み: Ameer Hamza 2020 年 12 月 4 日
rng('shuffle');
at startup.
  2 件のコメント
Kathrin Sadus
Kathrin Sadus 2020 年 12 月 7 日
Thanks, that was really helpful!
Ameer Hamza
Ameer Hamza 2020 年 12 月 7 日
I am glad to be of help!!!

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

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by