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

📄 program_6b.m

📁 《Dynamical Systems with Applications using MATLAB》源代码
💻 M
字号:
% Chapter 6 - Controlling Chaos.
% Program_6b - Controlling chaos in the Henon map.
% Copyright Birkhauser 2004. Stephen Lynch.

% Control to a period-1 orbit (Figure 6.6(a)).
clear
alpha=1.2;beta=0.4;
k1=-1.8;k2=1.2;              % The regulator poles.
xstar=0.8358;ystar=xstar;    % The point to be stabilized.
N=400;
x(1)=0.5;y(1)=0.6;           % Initial values.
rsqr(1)=(x(1))^2+(y(1))^2;
for n=1:N
    if n>198                 % Check point is in control region.
    x(n+1)=(-k1*(x(n)-xstar)-k2*(y(n)-ystar)+alpha)+beta*y(n)-(x(n))^2;
    y(n+1)=x(n);  
    else    
    x(n+1)=alpha+beta*y(n)-(x(n))^2;
    y(n+1)=x(n);
    end
    rsqr(n+1)=(x(n+1))^2+(y(n+1))^2;
end 
hold on
axis([0 N 0 6])
plot(1:N,rsqr(1:N))
plot(1:N,rsqr(1:N),'o')
fsize=15;
set(gca,'xtick',[0:50:N],'FontSize',fsize)
set(gca,'ytick',[0,6],'FontSize',fsize)
xlabel('n','FontSize',fsize)
ylabel('\it{r^2}','FontSize',fsize)
hold off

% End of Program_6b.

⌨️ 快捷键说明

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