function mattbar_norm(matrix) for i = 1:length(matrix) madS(i) = nanmean(bootstrp(1000,@nanmean,matrix{i})); madE(i) = nanmean(bootstrp(1000,@nanstd,matrix{i}))/sqrt(length(matrix{i})); end % figure;a = bar(1,madS(1),'BarWidth',0.75,'FaceColor',[0.2 0.2 0.2],'EdgeColor',[1 1 1],'FaceAlpha',0.8); % hold on;a = bar(2,madS(2),'BarWidth',0.75,'FaceColor',[1 1 1],'EdgeColor',[1 1 1],'FaceAlpha',0.8); figure; for i = 1:length(matrix) %a = bar(i,madS(i),'BarWidth',0.5,'FaceColor',[0.5 0.5 0.5],'EdgeColor',[1 1 1],'FaceAlpha',0.8); %a = bar(i,madS(i),'BarWidth',0.5,'FaceColor',[0.3 0.3 0.5],'EdgeColor',[1 1 1],'FaceAlpha',0.8); a = bar(i,madS(i),'BarWidth',0.75,'FaceColor',[0.5,0.5,0.5],'EdgeColor',[1 1 1],'FaceAlpha',0.8); hold on %a = bar(i+0.75,madS(i+1),'BarWidth',0.5,'FaceColor',[0.1 0.1 0.1],'EdgeColor',[1 1 1],'FaceAlpha',0.8); %a = bar(i+0.75,madS(i+1),'BarWidth',0.5,'FaceColor',[0.5 0.3 0.3],'EdgeColor',[1 1 1],'FaceAlpha',0.8); %a = bar(i+1.75,madS(i+1),'BarWidth',1,'FaceColor',[0.5,0.5,0.5],'EdgeColor',[1 1 1],'FaceAlpha',0.8); hold on end tlt = []; for i = 1:length(matrix) tlt = [tlt,i]; end a.EdgeColor = [0 0 0] hold on a = errorbar(tlt,madS,madE*2,'capsize',0);colormap([1 1 1]) a.LineStyle = 'none';a.Color = [0 0 0] a.LineWidth = 5; %mattformat grid on set(gca,'FontSize',25,'Color',[1 1 1]) %axis([0.5 2.5 0 1]) set(gcf,'Color',[1 1 1]) ylabel('Time spent in Octanol') % text(0.9,-0.05,'Pre','FontSize',25); % text(1.9,-0.05,'Post','FontSize',25); % text(0.8,-0.06,'CS+: MCH trial I','FontSize',15); % text(2.8,-0.06,'CS+: MCH trial II','FontSize',15); % text(4.8,-0.06,'CS+: OCT trial I','FontSize',15); % text(6.8,-0.06,'CS+: OCT trial II','FontSize',15); % % text(0.9,-0.03,'Pre','FontSize',10); % text(1.5,-0.03,'Post','FontSize',10); % text(2.9,-0.03,'Pre','FontSize',10); % text(3.5,-0.03,'Post','FontSize',10); % text(4.9,-0.03,'Pre','FontSize',10); % text(5.5,-0.03,'Post','FontSize',10); % text(6.9,-0.03,'Pre','FontSize',10); % text(7.5,-0.03,'Post','FontSize',10); xticklabels({''}) xticks(1:length(matrix)) %ai = axis;ai(4) = 0.25;axis(ai) cleanFormat