%% fig 6 load('dync_tauQ.mat') load('dync_main.mat'); tc_factor = 0.1879; dtc_factor = 0.0259; t0 = 1/(5e-3*22*131.4*2*pi) * 1e3 % in ms that = sqrt(t0*tauQ) % in ms Color_code{1} = 'r' Color_code{2} = 'b' Color_code{3} = [1 1 0] * 3 / 4; Color_code{4} = [1 0 1] * 3 / 4; Color_code{5} = [0.3 0.75 0.93]; Color_code{6} = [0 0.5 0]; figure(6) for jj = 1 : length(tauQ) color_code = Color_code{jj}; t_compare = abs(time_tc{jj}-that(jj)); [t_compare,i_compare] = sort(t_compare); i_ramp = find(time_tc{jj} == (1-0.1879)*tauQ(jj)); if isempty(i_ramp) [nearest_tR,i_nearest] = min(abs(time_tc{jj}-(1-0.1879)*tauQ(jj))); i_ramp = i_nearest; end subplot(2,1,1); shadedErrorBarG(time_tc_den{jj},den_cen{jj},[dden_cen{jj};dden_cen{jj}],{'-','color',color_code},1); hold on plot(that(jj),sum(den_cen{jj}(i_compare(1)) .* t_compare(1)) / sum(t_compare(1)),'s','color',color_code,... 'linewidth',2,'MarkerFaceColor','w','handlevisibility','off','MarkerSize',8) plot((1-tc_factor)*tauQ(jj),den_cen{jj}(i_ramp),'o','linewidth',2,'color',color_code,'MarkerFaceColor','w','handlevisibility','off') xlabel('$t-t_c$ (ms)','interpreter','latex') ylabel('$N_{cen}$','interpreter','latex') ylim([0 2e4]) xlim([-25 460]); set(gca,'linewidth',2,'fontsize',14); subplot(2,1,2); shadedErrorBarG(time_tc_den{jj}/that(jj),tauQ(jj)^0.25*den_cen{jj},tauQ(jj)^0.25*[dden_cen{jj};dden_cen{jj}],{'-','color',color_code},1); hold on plot(that(jj)/that(jj),tauQ(jj)^0.25*sum(den_cen{jj}(i_compare(1)) .* t_compare(1)) / sum(t_compare(1)),'s','color',color_code,... 'linewidth',2,'MarkerFaceColor','w','handlevisibility','off','MarkerSize',8) plot((1-tc_factor)*tauQ(jj)/that(jj),tauQ(jj)^0.25*den_cen{jj}(i_ramp),'o','linewidth',2,'color',color_code,'MarkerFaceColor','w','handlevisibility','off') xlabel('$(t-t_c)/\hat{t}$ (ms)','interpreter','latex') ylabel('$\tau_Q^{1/4}N_{cen}$','interpreter','latex') ylim([0 8e4]) xlim([-0.5 5.5]); set(gca,'linewidth',2,'fontsize',14); end