<>运行环境matlab </P>
<>X=[-2 0 0;0 -10 10;0 28 -1];
Y=[35 -10 -7]';
h=.01;
p=plot3(Y(1),Y(2),Y(3),'r*','EraseMode','xor','MarkerSize',5);
axis([0 50 -25 25 -25 25])
hold on
for i=1:2000
X(1,3)=Y(2);
X(3,1)=-Y(2);
Ydot=X*Y;
Y=Y+h*Ydot;
set(p,'XData',Y(1),'YData',Y(2),'ZData',Y(3))
drawnow
i=i+1;</P> |