klist=1:2:100; r1=1/5; r2=1/100; explist1=exp(-r1*klist); explist2=exp(-r2*klist); figure set(gca,'Fontsize',18) bar(klist,explist1+explist2) xlabel('k') title('sum of exponentials -- well fit my line') figure set(gca,'Fontsize',18) bar(klist,log(explist1+explist2)) xlabel('k') title('log of sum of exponentials -- not well fit by line') figure subplot(121) set(gca,'Fontsize',18) bar(klist,(explist1+explist2)) xlabel('k') title('sum of exponentials, split into two ranges') axis([0 15 -Inf Inf]) subplot(122) set(gca,'Fontsize',18) bar(klist,(explist1+explist2)) xlabel('k') axis([15 100 -Inf Inf])