I am having a problem with a Delayed recognition span test possibly related to stacking scenes. Particularly with a concurrent scene. Any assistance would be appreciated. I'll attach the code but I am clipping the main loop to annotate the parts that fail or fail after the 4 th loop. I have been reading code for 40 years but not much experience with Matlab. Thanks.
Current software Matlab 2021, ML 2.2 Nov 21
------Snip------- Lines with Arrows are problems noted. They are not in the code
for i = 2 : numIters-1
if fixCells{i}.Success
if fixCells{i}.ChosenTarget == i
%goodmonkey(2000, 'juiceline',1, 'numreward',1, 'pausetime',0, 'eventmarker',50);
%Play correct Sound
con1 = Concurrent(tc_Correct);
con1.add(BoxCells{i});
scene = create_scene(con1);
>>>> run_scene(scene); >>>> No reward no Sound
idle(0); %test for sound
goodmonkey(2000, 'juiceline',1, 'numreward',1, 'pausetime',0, 'eventmarker',50);
idle(2000); %inter trial interval
scene2 = create_scene(tc_newScene);
>>>> run_scene(scene2); >>>> Runs correctly 3 times IE new box presentation has a sound
%idle(500);
scene3 = create_scene(fixCells{i+1});
run_scene(scene3);
else
trialerror(6); % wrong
>>>> scene = create_scene(tc_Incorrect); >>>> works correctly
run_scene(scene);
idle(700, [0 1 0]);
return;
end
else
trialerror(3); % Didn't touch any
scene = create_scene(tc_Incorrect);
run_scene(scene);
idle(700, [0 1 0]);
return;
end
end
if fixCells{numIters}.Success
if fixCells{numIters}.ChosenTarget == numIters
% goodmonkey(2000, 'juiceline',1, 'numreward',1, 'pausetime',0, 'eventmarker',50);
scene = create_scene(tc_Correct);
run_scene(scene);
goodmonkey(2000, 'juiceline',1, 'numreward',1, 'pausetime',0, 'eventmarker',50);
idle(0);
trialerror(0); %No Error in any one
return
else
trialerror(6); % wrong
scene = create_scene(tc_Incorrect);
run_scene(scene);
idle(700, [0 1 0]);
return;
end
else
trialerror(3); % Didn't touch any
scene = create_scene(tc_Incorrect);
run_scene(scene);
idle(700, [0 1 0]);
return;
end