|
改下区间就可以了:
clear all
%the non-zero point is (sqrt(35*3),sqrt(35*3),-35),(-sqrt(35*3),-sqrt(35*3),-35)
ch=inline...
('[35*y(2)-(35-y(4)+1)*y(1);(28-y(6)-y(4))*y(1)+(28-1-y(6))*y(2)-sqrt(35*3)*y(3)-y(1)*y(3);sqrt(35*3)-(3+1+y(5))*y(3)+y(1)*y(3);-(y(1)^2)+y(1)*y(2);-(y(3)^2);y(2)^2+y(1)*y(2)]','t','y');
options=odeset('RelTol',1e-4,'AbsTol',1e-4);
[t,ya]=ode45(ch,[-0.05 0.05],[10,10,10,-1,1,-1],options);
figure(1)
%plot the system states x,y,z
plot(t,ya(:,1)+sqrt(35*3),'k-',t,ya(:,2)+sqrt(35*3),'k-.',t,ya(:,3)-35,'k:')
xlabel('t/s');
ylabel('x,y,z'); |
|