clear				
xlab = 'Year'; 		
ylab = 'Population ($\times 10^6$)'; 			
mytitle = 'U. S. Population'; 	
pcensus = [3.929 5.308 7.240 9.638 12.866 17.069 23.192 31.433 39.818];
tt = [1790]; pmal = [3.929];
for i=1:8
    t = tt(i) + 10;
    mal = pmal(i) + 0.349*pmal(i);
    tt = [tt,t];
    pmal = [pmal,mal];
    formatSpec = 'Year is %d, Population is %8.3f M\n';
    fprintf(formatSpec,t,mal)
end
plot(tt,pmal,'r-','LineWidth',1.5);
hold on
plot(tt,pcensus,'o','MarkerSize',6);
grid
legend('Malthusian Model','Census Data','Location','Northwest');

ax = [1790 1870 0 50];
fontlabs = 'Times New Roman';   
xlabel(xlab,'FontSize',14,'FontName',fontlabs,'interpreter','latex');  
ylabel(ylab,'FontSize',14,'FontName',fontlabs,'interpreter','latex');  
title(mytitle,'FontSize',16,'FontName','Times New Roman','interpreter','latex'); 
set(gca,'FontSize',12);  
print -depsc uspopmal.eps		


