快好知 kuaihz

logistic映射

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, ".")

作业:找一个合适的a,使得周期为32.

本站资源来自互联网,仅供学习,如有侵权,请通知删除,敬请谅解!
搜索建议:logistic映射  映射  映射词条  logistic  logistic词条