Rossler_euler.m
% Rossler图形(欧拉方法) % % Author:yujunjie % Author's email: ustb03-07@yahoo.com.cn % clear h=0.006;a=0.15;b=0.2;c=10; x=0;y=-12;z=0; Y=[]; for i=1:10000 x1=x+h*(-y-z); y1=y+h*(x+a*y); z1=z+h*(b+x*z-c*z); x=x1;y=y1;z=z1; Y(i,:)=[x y z]; end plot3(Y(:,1),Y(:,2),Y(:,3));
|

rossler_le_eu.m
% 奇异值分解求Lyapunov法 % 微分rossler系统 % % Author:yujunjie % Author's email: ustb03-07@yahoo.com.cn % h=0.005;a=0.15;b=0.2;c=10; x=0;y=-12;z=0; V=eye(3); S=V;b1=0; k=10000; for i=1:k x1=x+h*(-y-z); y1=y+h*(x+a*y); z1=z+h*(b+x*z-c*z); x=x1;y=y1;z=z1; J=[0 -1 -1 1 a 0 z 0 x-c]; J=eye(3)+h*J; B=J*V*S; [V,S,U]=svd(B); a_max=max(diag(S)); S=(1/a_max)*S; b1=b1+log(a_max); end Lyapunov=(log(diag(S))+b1)/(k*h)
|
>> rossler_le_eu
Lyapunov =
0.0972
-0.0152
-9.8887
No comments:
Post a Comment