close all
clear all

solutionInterval = 1:1000; %Number of iterations
cutOff = 600; %Time after which to plot points

rstart=0;
rend=4;
rstep=.0001;

rRange = rstart:rstep:rend;

x = 0.5*ones(1,length(rRange)) ; %Initial guess is always 1/2

index = 1;

for r = rRange;
for n = solutionInterval ;
x(n+1,index) = r*x(n,index)*(1-x(n,index));
end
index = index + 1;
end

x = x(cutOff:end,:);
figure
plot(rRange,x,'r.','MarkerSize' ,.1)
