⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 program_2d.m

📁 一个简单的在matlab上实现logistic方程
💻 M
字号:
% Chapter 2 - Nonlinear Discrete Dynamical Systems.
% Program 2d - Bifurcation diagram of the logistic map.
% Copyright Birkhauser 2004. Stephen Lynch.

% Plot a bifurcation diagram (Figure 2.15).
% Plot 30 points for each r value.
clear
itermax=100;
finalits=30;finits=itermax-(finalits-1);
for r=0:0.005:4
    x=0.4;
    xo=x;
    for n=2:itermax
        xn=r*xo*(1-xo);
        x=[x xn];
        xo=xn;
    end
    plot(r*ones(finalits),x(finits:itermax),'.','MarkerSize',1)
    hold on
end
fsize=15;
set(gca,'xtick',[0:1:4],'FontSize',fsize)
set(gca,'ytick',[0,0.5,1],'FontSize',fsize)
xlabel('{\mu}','FontSize',fsize)
ylabel('\itx','FontSize',fsize)
hold off

% End of Program 2d.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -