正面教材分享 http://blog.sciencenet.cn/u/wdlang 70%的以色列人是无神论者,不过他们都相信上帝给了他们那块土地。这个世界经不起思考

博文

logistic映射

已有 1224 次阅读 2019-10-15 11:22 |个人分类:计算方法|系统分类:教学心得

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.



http://blog.sciencenet.cn/blog-100379-1201982.html

上一篇:JPA审稿意见
下一篇:舍入误差在aitken方法中的体现

2 陆展鹏 杨正瓴

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备14006957 )

GMT+8, 2019-12-6 08:59

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部