rosslerdis.m

来自「用来计算rossler吸引子的程序」· M 代码 · 共 32 行

M
32
字号
function Rosslerdis
clear
clc,clf,
[t,y]=ode45('Rossler',[0 :0.01:500],[-1,0,1]);
%表示在0-30秒内求解,在零时刻设y(1)为12,y(2)为2,y(3)为9
X = y(40001:end,1);
Y = y(40001:end,2);
Z = y(40001:end,3);

for j=1:3
      subplot(2,2,j);
       plot(40001:50000,y(40001:50000,j),'r')
      
end  



subplot(2,2,4);
%plot(y(:,2),y(:,3))
plot3(X,Y,Z);
view([20,42]);
grid on
subplot(2,2,1);
title('y(1),即x与时间的关系图')
subplot(2,2,2);
title('y(2),即y与时间的关系图')
subplot(2,2,3);
title('y(3),即z与时间的关系图')
subplot(2,2,4);
title('三维关系图')
save 'd:\rossler.dat' y -ascii;

⌨️ 快捷键说明

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