load nacho364
bins = 0:1:max(amplitudes);
N_cnqx = histc(amplitudes,bins);
C_cnqx = cumsum(N_cnqx);
mu_cnqx = mean(amplitudes);
sigma_cnqx = std(amplitudes);

load nacho361
N_ctrl = histc(amplitudes,bins);
C_ctrl = cumsum(N_ctrl);
mu_ctrl = mean(amplitudes);
sigma_ctrl = std(amplitudes);

figure;
plot(bins,C_ctrl/max(C_ctrl)*100,'-k','LineWidth',3); hold on;
plot(bins,C_cnqx/max(C_cnqx)*100,'-r','LineWidth',3);

axis([0 max(bins) 0 101])
set(gca,'FontSize',16);
legend('control (nacho361)','CNQX-treated (nacho364)','Location','SouthEast')
ylabel('Percentage of Events')
xlabel('Amplitude (pA)');


figure;
bar([0 1],[mu_ctrl mu_cnqx]); hold on;
errorbar(0,mu_ctrl,sigma_ctrl,'-k','LineWidth',2);
errorbar(1,mu_cnqx,sigma_cnqx,'-k','LineWidth',2);
grid on;
set(gca,'FontSize',16,'XTick',[0 1],'XTickLabel',{['Control'],['CNQX-treated']});
ylabel('Amplitude (pA)')