필터 지우기
필터 지우기

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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by