mardi 28 août 2018

How to make trials jitter in a certain temporal block in MATLAB

I am trying to design a fMRI experiment that trials jitter in a certain time-block. A single trial takes 3.5 seconds and I want every trial to appear in a block of 6 seconds.

For example, if this trial starts simultaneously with this time block, it will start at 0-second point, end after 3.5 seconds, and the next trial will start after 2.5 seconds. If a trial started 1.2 seconds after the block started, the trial will end at 4.7 seconds after the start of the block and will show a fixation cross for 1.3 seconds to reach the end of the 6-second block.

Basically, I want this 3.5-second smaller block to freely float inside a bigger, 6-second block in a random manner. How can I achieve this in MATLAB?

I attached a descriptive figure for better understanding.




Aucun commentaire:

Enregistrer un commentaire