Calendar Latest Topics

  Author   Comment  

Junior Member
Posts: 27
Reply with quote  #1 

Hi All,

on each trial of a fixation/visual stimulus task, I would like to deliver reward after a jittered delay, in order to prevent preparatory activity by the subject. I imagine others have needed this, so I am wondering if a solution already exists --

The two ways I imagined doing this were 1) delivering technically 2 pulses of reward, but with the 1st reward pulse duration = 0 ms, and the 'PauseTime' set to a jittered value, or 2) create a reward delay "scene" using the Timecounter adapter, with the timecounter.duration set to a jittered value, and run the reward delay scene only if the subject completed a trial successfully (that is, lh.Success = 1; see line 92 of attached code). The problem with the second method appears to be, that once the jittered value is set (line 29), it is used repeatedly for every trial. 

Is there a way to either implement #1, or redefine the jittered delay variable of #2 on every trial? or pros/cons of either approach?

attaching code for clarity. 


Attached Files
m lh_expFaces_test.m (3.97 KB, 4 views)
txt lh_expFaces_test.txt (630 Bytes, 2 views)


Posts: 971
Reply with quote  #2 
How did you find that the same jitter value is used repeatedly? Your jitter range is 400-600 ms and it changes every trial when I test.

You can use idle (the same as reward_scene) or pause (if you need a more accurate measure) as well.
Previous Topic | Next Topic

Quick Navigation:

Easily create a Forum Website with Website Toolbox.