Filter löschen
Filter löschen

Failing randomization through closing matlab

3 Ansichten (letzte 30 Tage)
Kathrin Sadus
Kathrin Sadus am 4 Dez. 2020
Kommentiert: Ameer Hamza am 7 Dez. 2020
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

Antworten (1)

Ameer Hamza
Ameer Hamza am 4 Dez. 2020
Bearbeitet: Ameer Hamza am 4 Dez. 2020
rng('shuffle');
at startup.
  2 Kommentare
Kathrin Sadus
Kathrin Sadus am 7 Dez. 2020
Thanks, that was really helpful!
Ameer Hamza
Ameer Hamza am 7 Dez. 2020
I am glad to be of help!!!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by