load('CtrlDreaddCumValsNew.mat', 'Control_cumvals', 'Exp_cumvals','Naive_cumvals' )

%%
figure
errorbar(nanmean(Control_cumvals,2),nanstd(Control_cumvals,[],2)/sqrt(20),'k')
hold on
errorbar(nanmean(Exp_cumvals(1:100,:),2),nanstd(Exp_cumvals(1:100,:),[],2)/sqrt(12),'r')
hold on
errorbar(nanmean(Naive_cumvals(1:100,:),2),nanstd(Naive_cumvals(1:100,:),[],2)/sqrt(5),'b')

ylabel('Cummulative Sum')
xlabel('trial #')

xlim([0 100])


%%
for i =1:size(Control_cumvals,2)
    plot(Control_cumvals(:,i),'k')
    hold on
end


for i =1:size(Exp_cumvals,2)
    plot(Exp_cumvals(:,i),'r')
    hold on
end



for i =1:size(Naive_cumvals,2)
    plot(Naive_cumvals(:,i),'b')
    hold on
end

legend({'Control (n=20)', 'hM4Di (n=12)',  'Naive (n=5)'})
ylim([-100 100])
set(gca,'ytick', -100:50:100)
