Effacer les filtres
Effacer les filtres

I need help in designing a 1-back task

1 vue (au cours des 30 derniers jours)
Kyle Davis
Kyle Davis le 31 Jan 2019
Commenté : Adam Danz le 31 Jan 2019
Hi all, I am trying to design a 1-back task, where I need to randomly present 21 consonents in a sequence which consists of 48 trials. My instructions are to ensure that a 'target letter' (a letter that matches the letter that was shown immediately before) occurs on roughly 33% of trials within one sequence. I currently cannot identify a way in which I would be able to ensure that this happens using Matlab code.
I currently have the following code, in which I am trying to implement the above instruction.
sequence = char(ones(48, 2)); %This results in sequence being a 48 X 2 char array
letters = 'BCDFGHJKLMNPQRSTVWXYZ'; %define variable 'letters' as 21 consonents
indices = randi(length(letters), 48, 1); %randomly present variable 'letters' in a 48 by 1 array
sequence(:, 1) = letters(indices); %fill the first column, every row with random presentation of letters
resps= 'TN'; %define 'target' and 'non-target'. T= target, N= non-target
indices=randi(length(resps)48, 1); %randomly present T or N in a 48 by 1 array
sequence(:,2)= resps(indices) % fill in second column of sequence with T or N.
%need to ensure that each value in sequence has a 33% chance of being a target ('T')
%e.g. the letter is the same as the letter presented previously.
I am also not sure if this is the best way to go about solving the problem. I am open to any suggestions that anyone has that would allow me to implement the above requirement. I appreciate any help that anyone can offer.
  1 commentaire
Adam Danz
Adam Danz le 31 Jan 2019
I need to randomly present 21 consonents in a sequence which consists of 48 trials
Does that mean on each trial you will have a vector of 21 consonents all visible in a row?
My instructions are to ensure that a 'target letter' (a letter that matches the letter that was shown immediately before) occurs on roughly 33% of trials within one sequence.
So, between trials you are displaying a single random target letter that changes for each trial and on 33% of the trials at least one of the 21 consonents will contain that letter. On the other trials, the target letter will not be part of the 21 consonents, right?
How I imagine it, a trial would look like this:
  1. Flash target letter: Q
  2. Show 21 consonent sequence: SHTRPMNZRRTLKGGGGSSSS (does not contain Q)
  3. Flash target letter: H
  4. Show 21 consonent sequence: YYYYYHHHHNNNRRRLLLPPP (does contain H)
  5. repeat until there has been 48 trials.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by