logsim.m

来自「非线性控制 Matlab编译」· M 代码 · 共 32 行

M
32
字号
% Copyright (c) 1998 The University of Texas at Austinfunction obs=logsim(pert)%Subroutine for use with the Matlab file logdemo.m  %Iterates f(x) = mu * (x + pert) * (1 - (x + pert))%mu = 3.5 corresponds to a period four attractor in the logistic mapglobal cur mu;if (length(cur)==0)  cur = .2;  mu = 3.5;end in = pert + cur;cur = mu * in * (1 - in);%We must ensure that the system remains bounded in [0,1].  Since%the applied perturbations are small, this code is rarely used.if cur > 1  cur  cur = cur - floor(cur);elseif cur < 0  cur  cur = cur - floor(cur);endobs = cur;   

⌨️ 快捷键说明

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