clear close all load('Fig 5a - Long_term_corrected_extracted_data.mat'); %% figure cOrder = get(gca,'ColorORder'); indx = 0; for f = [5 4 1 2] indx = indx+1; disp(flist(f).name); iG = intensGAll{f}; iR = intensRAll{f}; iRatio = iG./iR; iRatio2(:,indx) = mean(iRatio,1); if f > 3 currColor = cOrder(1,:); else currColor = cOrder(2,:); end plot(timeAll{f}(2,:)/3600,mean(iRatio,1),'Color',currColor) hold all end set(gca,'XLim',[0 4]) legend('0 gent','0 gent','10 gent','10 gent','Location','Northwest') ylabel('488/561 fluorescence ratio') xlabel('Time (hrs)') saveas(gca,'ATP_10_vs_0_gent.png'); saveas(gca,'ATP_10_vs_0_gent.fig'); figure plot(timeAll{f}(2,:)/3600,mean(iRatio2(:,1:2),2)) hold all plot(timeAll{f}(2,:)/3600,mean(iRatio2(:,3:4),2)) set(gca,'XLim',[0 4]) legend('0 gent','10 gent','Location','Northwest') ylabel('488/561 fluorescence ratio') xlabel('Time (hrs)') saveas(gca,'ATP_10_vs_0_gent_mean.png'); saveas(gca,'ATP_10_vs_0_gent_mean.fig'); %% figure set(gcf,'Position',[680 400 432 207]) cOrder = get(gca,'ColorOrder'); shadedErrorBar(timeAll{1}(2,:)/3600,iRatio2(:,1:2)',... {@nanmean,@stdError},'LineProps',{'Color',cOrder(1,:)}); hold all shadedErrorBar(timeAll{1}(2,:)/3600,iRatio2(:,3:4)',... {@nanmean,@std},'LineProps',{'Color',cOrder(2,:)}); set(gca,'FontSize',16,'XLim',[0 4]) saveas(gca,'ATP_10_vs_0_gent_mean_shaded.png'); saveas(gca,'ATP_10_vs_0_gent_mean_shaded.fig'); %% statistics t1 = find(timeAll{1}(2,:)/3600 > 2,1); indx = 0; for f = [5 4 1 2] indx = indx+1; iG = intensGAll{f}; iR = intensRAll{f}; iRatio = iG./iR; vals{indx} = iRatio(:,t1); end