function f=logisitic_population(initial_pop,b,generations)

%%This m-file will use the logistic map x(t+1)=b*x(t)*(1-x(t)) to plot the
%%population versus time for the amount of generations specified

x(1)=initial_pop;

for i=2:generations
    x(i)=b*x(i-1)*(1-x(i-1));
end

t=1:generations;
maxy=max(x);

clf reset;
ax=gca;
hold on;
set(ax,'title',text('string',sprintf('b=%2.2f',b),...
    'color','r','fontsize',14));
plot(t,x);
axis([1 generations 0 maxy+.1]);
display(x);