Hi Chris,
I am a bit confused how list can be used to make something like a for loop.
In this example, how could I create a loop inside the existing loop with the same list as for_each_stim? I am not sure how the list {…} and for_each_stim{…} are related here.
var stim_index (scope = local; default_value = 0)
%define for_each_stim ()
range_replicator (
variable = stim_index
from = 0
to = num_stims - 1
step = 1
)
%end
protocol ‘Mental Time Travel 2_images’ {
start_io_device (keyboard)
block (nsamples = num_trials_per_stim) {
list (
selection = random_without_replacement
nsamples = num_stims
sampling_method = samples
) {
for_each_stim {
trial {
task {
state ‘Begin trial’ {
target_stim_index = stim_index
…
…
…
Thanks,
–
Sujay