function cumvals = JScumvals(MicStim)
%% Cummulative response


trialNum = length(MicStim);


cum = 0;
cumvals=[];

for i = 1:trialNum
    
    if MicStim(i,3) ==1  %Hit
        cum = cum+1;
    elseif MicStim(i,3) == 0 %Miss
        cum = cum-1;
    else
        cum = cum;
    end
    cumvals = [cumvals; cum];
    
end

figure
plot(cumvals)
end
