Multiple types of trials in one block #1870
Unanswered
blueraindrops
asked this question in
Q&A
Replies: 1 comment
-
Hi everyone, I think I may have figured it out myself by looking through some old conversations. I added var block_1_components = [trial_A, trial_A, trial_A, trial_A, trial_A, trial_B, trial_B, trial_B, trial_B, trial_B];
var block_1_complete = jsPsych.randomization.repeat(block_1_components, 2);
var block_1_timeline = {
timeline: block_1_complete
};
var block_2_components = [trial_C, trial_C, trial_C, trial_C, trial_C, trial_D, trial_D, trial_D, trial_D, trial_D];
var block_2_complete = jsPsych.randomization.repeat(block_2_components, 2);
var block_2_timeline = {
timeline: block_2_complete
};
var timeline = [];
timeline.push(block_1_complete, block_2_timeline, block_1_complete, block_2_timeline); Hopefully this helps somebody else! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I'm not sure if this has been asked before but I'm trying to create an experiment where there are two types of trials in a single block, and two types of blocks that alternate twice. So the general setup would be Block 1, Bock 2, Block 1, Block 2, with Block 1 containing 10 repeats of Trial A and 10 of Trial B, and Block 2 containing 10 repeats of Trial C and 10 of Trial D. Each type of trial also has a unique timeline.
I want each block to have randomized trials, and what I've tried using isn't working so far. This is what I have (after defining the stimuli of each trial):
I'm not sure whether
block_1_complete
orblock_2_complete
is what I should be placing in the timeline, or something else? Thank you in advance!Beta Was this translation helpful? Give feedback.
All reactions