program_2c.m

来自「《Dynamical Systems with Applications usi」· M 代码 · 共 19 行

M
19
字号
% Chapter 2 - Nonlinear Discrete Dynamical Systems.
% Program 2c - Computing a Lyapunov exponent for the logistic map.
% Copyright Birkhauser 2004. Stephen Lynch.

% Lyapunov exponent when mu=4 (Table 2.1).
clear;
mu=4;
x=0.1;xo=x;
itermax=49999;
    for n=1:itermax
        xn=mu*xo*(1-xo);
        x=[x xn];
        xo=xn;
    end

Liap_exp=vpa(sum(log(abs(mu*(1-2*x))))/itermax,6)

% End of Program 2c.

⌨️ 快捷键说明

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