You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code actually gets reaction times ONLY from trials in which the lick bout begins before the cue, rather than the remaining trials:
%Reaction time
temp = find(respTimes>=trialData.cueTimes(idx(i)),1,'first');
trialData.reaction(idx(i)) = CODE(respIdx(temp));
% if there is no lick for 0.5 s before cue onset (i.e., mouse not licking prior to cue)
if sum((respTimes-respTimes(temp))>-0.5 & (respTimes-respTimes(temp))<0)
trialData.reactionTimes(idx(i)) = respTimes(temp)-trialData.cueTimes(idx(i)); %relative to cue time
end
The text was updated successfully, but these errors were encountered:
This code actually gets reaction times ONLY from trials in which the lick bout begins before the cue, rather than the remaining trials:
%Reaction time
temp = find(respTimes>=trialData.cueTimes(idx(i)),1,'first');
trialData.reaction(idx(i)) = CODE(respIdx(temp));
% if there is no lick for 0.5 s before cue onset (i.e., mouse not licking prior to cue)
if sum((respTimes-respTimes(temp))>-0.5 & (respTimes-respTimes(temp))<0)
trialData.reactionTimes(idx(i)) = respTimes(temp)-trialData.cueTimes(idx(i)); %relative to cue time
end
The text was updated successfully, but these errors were encountered: