clear all; close all; clc;
a = 0.5;
N = 100;
xlist = zeros(1, N);
xlist(1) = 0.3;
for s = 2 : N
xlist(s) = a * xlist(s-1) * (1 - xlist(s-1));
end
h1 = figure;
plot(xlist,"-*")
title(["a=",num2str(a)])
a = 1.5;
N = 100;
xlist = zeros(1, N);
xlist(1) = 0.3;
for s = 2 : N
xlist(s) = a * xlist(s-1) * (1 - xlist(s-1));
end
h2 = figure;
plot(xlist,"-*")
title(["a=",num2str(a)])
a = 3.2;
N = 100;
xlist = zeros(1, N);
xlist(1) = 0.3;
for s = 2 : N
xlist(s) = a * xlist(s-1) * (1 - xlist(s-1));
end
h3 = figure;
plot(xlist,"-*")
title(["a=",num2str(a)])
a = 3.5;
N = 100;
xlist = zeros(1, N);
xlist(1) = 0.3;
for s = 2 : N
xlist(s) = a * xlist(s-1) * (1 - xlist(s-1));
end
h4 = figure;
plot(xlist,"-*")
title(["a=",num2str(a)])
a = 3.55;
N = 100;
xlist = zeros(1, N);
xlist(1) = 0.3;
for s = 2 : N
xlist(s) = a * xlist(s-1) * (1 - xlist(s-1));
end
h5 = figure;
plot(xlist,"-*")
title(["a=",num2str(a)])
a = 3.57;
N = 100;
xlist = zeros(1, N);
xlist(1) = 0.3;
for s = 2 : N
xlist(s) = a * xlist(s-1) * (1 - xlist(s-1));
end
h6 = figure;
plot(xlist,"-*")
title(["a=",num2str(a)])
整体的行为:
clear all; close all; clc;
alist = 0 : 0.01: 4;
N1 = 1e5;
N2 = 1e3;
keep = zeros(N2, length(alist));
for s1 = 1 : length(alist)
a = alist(s1);
x = 0.3;
for s2 = 1 : N1
x = a * x *(1- x );
end
for s2 = 1 : N2
x = a * x *(1- x );
keep(s2, s1) = x ;
end
end
plot(alist, keep, ".")