How to repeat letter presented two steps before?

3 visualizaciones (últimos 30 días)
Rotem Maymon
Rotem Maymon el 22 de Feb. de 2018
Respondida: Jos (10584) el 22 de Feb. de 2018
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 :)

Respuestas (1)

Jos (10584)
Jos (10584) el 22 de Feb. de 2018
This seems to be some kind of homework assignment (which is fine!) so I will just give you some thoughts:
  1. You have a set X of letters
  2. Randomly select a letter L from X (using e.g. randperm)
  3. Put that letter L at position k in the sequence of letters S
  4. Remove L from X
  5. Get the letter at position S(k-2) and put that back into X
  6. Return to 1 until you filled the whole array
Now none of the letters in S are targets, so to create targets:
  1. select 20 random positions i (using randperm)
  2. Set the letters at positions i+2 to the letters at position i (S(i+2) = S(i))

Categorías

Más información sobre Entering Commands en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by