0

I have a design for an experiment that I would like to code in psychtoolbox using MATLAB. I understand the basics of how to use this toolbox however it would be extremely helpful if someone has designed a similar experiment before and could provide me with some code that could help me to carry out the following:

The experimental procedure will be composed of 80 trials divided into 5 blocks with 16 trials in each block. The experiment consists of the participant selecting a number from the screen. There is a desirable number (target number) and an associated less desirable number (lure number). I won't go into further detail about the reasoning behind this experiment as it is not relevant to my question.

I have attached an image that shows 1 block of trials (16 trials). The other 4 blocks are the same as this block.

Trials

Target and lure numbers will be presented on the screen to choose from (an example can be seen in image below).

number presentation on screen

In some of the trials as can be seen from the trials table only one target number and one lure number are presented for the participant to choose from (instead of two targets and two lures).

The lure(s) that appears with each target(s) should not always be the same. I want the lure that is shown with the target to be randomly selected in each trial (as can be seen in the trials image there is more than one possible lure). In the trials image I have attached the trial numbers are presented just for clarity, in each block the presentation of the targets needs to be randomized.

sahasrara62
  • 10,069
  • 3
  • 29
  • 44

1 Answers1

0

You can use the BalanceTrials function that comes with psychtoolbox. You use all the possible lures and targets as inputs and it returns a random order of all possible combinations. You can also specify a minimum length of the list it returns, but if there are more combinations it will make the list longer to make it balanced. Here is an example:

numberOfTrials = 80;

targetNumbers = {'3','4','5','6','7','4 5','4 6','4 7'}; 

lureNumbers = {'3','4','5','6','7','4 7'};

[targets, lures] = BalanceTrials(numberOfTrials, 1, targetNumbers, lureNumbers);

You can split this up into 5 blocks or you do it each time for each block.