clear				% Clear previous definitions
figure(1)           % Assign figure number
clf                 % Clear previous figures
hold off            % Start with fresh graph
mytitle = '\it Escherichia coli'; 	
xlab = '$t$ (min)'; 	
ylab = '$P(t)$ (OD$_{420}$)'; 
td = [0	20	40	60	80	100	120	140	160];
pd = [0.195 0.206 0.241 0.308 0.364 0.421 0.473 0.527 0.618];
tt = linspace(0,180,200);	
[p1,J,flag] = fminsearch(@sumsq_ecoli,[0.2,0.01],[],td,pd)
Pt = p1(1)*exp(p1(2)*tt);   
plot(tt,Pt,'b-','LineWidth',1.5);  
hold on   
plot(td,pd,'bo','LineWidth',1.5); 
grid 
myeqn=['$P(t)=',num2str(p1(1)), 'e^{' ,num2str(p1(2)), 't}$' ];
text(42,0.53,myeqn,'FontSize',14,'interpreter','latex');
legend('Model', 'Data','Location','southeast');
xlim([0 180]); 
ylim([0 0.8]);
fontlabs = 'Times New Roman'; 
xlabel(xlab,'FontSize',14,'FontName',fontlabs,'interpreter','latex'); 
ylabel(ylab,'FontSize',14,'FontName',fontlabs,'interpreter','latex');
title(mytitle,'FontSize',18,'FontName',fontlabs,'interpreter','latex'); 
set(gca,'FontSize',12); 
print -depsc ecoli.eps	
print -djpeg ecoli.jpg	
