Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
% logistic.m
% Logistic map
clear
xold = 0.231;
maxg = 900; % 4000 for good coverage (pause off)
ming = 2.9;
figure(1);
clf
axis([2.7 4 0 1]);
hold on
for gainloop = 1:maxg
g=(4.00-ming)*gainloop/maxg + ming;
for sloop = 1:100 %settle-down loop
xnew = g*xold*(1-xold);
xold = xnew;
end % end settle-down loop
rep = 64;
ind = 0;
for rloop = 1:rep
xnew = g*xold*(1-xold);
xold = xnew;
ind = ind + 1;
x(ind) = g + (4.00-ming)*(rloop-1)/(maxg*rep);
y(ind) = xnew;
end % end rloop
plot(x,y,'o','MarkerSize',2);
pause(0.01) % Take pause off to watch real-time, but put maxg to 300
end % end gainloop
hold off