|
楼主 |
发表于 2008-1-7 21:50
|
显示全部楼层
function xdot=rossler(t,x,flag,c)
a=0.2;
b=0.2;
xdot=[-(x(2)+x(3));x(1)+a*x(2);
x(3)*(x(1)-c)+b]
clear
options=odeset('RelTol',1e-10,'AbsTol',[1e-10 1e-10 1e-10 ]);
c=sqrt(3);
[t,x]=ode45('rossler',[0:0.001:100],[-0.2 0.1 0.1],options,c);
figure(1);
subplot(2,1,1);
plot(t,x(:,1));
% axis([20 30 -0.1 0.1]);
subplot(2,1,2);
plot(t,x(:,2));
% axis([20 30 -1 1]);
figure(2);
plot(x(end-50000:end,1),x(end-50000:end,2)) figure(3);
final=fix(35*c/pi);
for i=1:final
g=(100001-7e4)+fix(2*pi*1000/c*i);
plot(x(g,1),x(g,2),'r*'); hold on
end
hold off |
|