How to repeat letter presented two steps before?
Ältere Kommentare anzeigen
Hello, I'm having truble to create an experiment with the next design: 100 trials: each trial presents one letter in the middle of the screen (out of 10 possibles ones (A-J)), when 20 trials need to presents a letter showed 2 step before him (two-back condition), and 80 more trials presents a random letter in a random order (except the letter showed two letters before him)... did someone have an idea??
thanks :)
Antworten (1)
Jos (10584)
am 22 Feb. 2018
0 Stimmen
This seems to be some kind of homework assignment (which is fine!) so I will just give you some thoughts:
- You have a set X of letters
- Randomly select a letter L from X (using e.g. randperm)
- Put that letter L at position k in the sequence of letters S
- Remove L from X
- Get the letter at position S(k-2) and put that back into X
- Return to 1 until you filled the whole array
Now none of the letters in S are targets, so to create targets:
- select 20 random positions i (using randperm)
- Set the letters at positions i+2 to the letters at position i (S(i+2) = S(i))
Kategorien
Mehr zu Entering Commands finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!