应用QR法求Lyapunov指数
下面是我用QR法画Duffing方程的Lyapunov指数,但结果分析其中一指数一直大于零,与实际不符,望各位高手给与指点!--------------------------------------------------------------------------------------------------------
clear;clc;
tic;
w0=1;a=1;b=-1;c=1;
T=2*pi/w0;
F=0:0.01:1;
for i=1:length(F)
=ode45('my_duffing',,,[],a,b,c,F(i),w0);
N=length(x(:,1));
L1=0;
L2=0;
Q=eye(2,2);
for j=1:N
A=;
=qr(A*Q);
R=diag(R);
L1=L1+log(abs(R(1)));
L2=L2+log(abs(R(2)));
end
L11(i)=L1/N;
L22(i)=L2/N;
end
plot(F,L),grid on;
------------------------------------------------------------
M函数
function dx=my_duffing(t,x,flag,a,b,c,F,w0)
dx=;
---------------------------------------------------------------
回复
实际结果是什么样的?
页:
[1]