% Generating Figure S2 in supplementary materials; Selecting any of the qtau functional forms % will lead to one of the curves in Fig S2 as indicated by color curves. clear all clc; ntau=100; h=5/100; for i=1:ntau+1 tau(i)=(i-1)*h; % delay in start of treatment % Probability of developing resistance with delay in start of treatment (red curve) q(i)=15*exp(-2*tau(i))/(1+exp(-2*(tau(i)-2))); % Probability of developing resistance with delay in start of treatment (black curve) %q(i)=2*exp(-1.*tau(i)/1)/(1+exp(-5*(tau(i)-1.5))); % Probability of developing resistance with delay in start of treatment (blue curve) %q(i)=0.25/(1+exp(-2*(tau(i)-2))); %Probability of developing resistance with delay in start of treatment end plot(tau,q,'r'); xlim([0 5]); ylim([0 0.35]); % hold on