initPop=0.8;
itMax=10000;
y=[];
x=[];
for r=2:0.001:4
    tmp=logisticFct( r, initPop, itMax );
    
    tmp=unique(tmp(1000:itMax));
    y=[y tmp];
    x=[x r*ones(1,length(tmp))];
end
plot(x,y,'.')
xlabel 'Growth rate (r)'
ylabel 'Population size'