马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
下面是计算分数阶吸引子的程序,分数阶的系统已经计算出来了,按照整数阶的规律画李指数应该很简单,可惜不会。顺便附带整数阶李指数的程序,看有木有人能给耦合一下,做出来结果,酬金三百。
function [T, Y]=FOChen(parameters, orders, TSim, Y0)
% time step:
h=0.005;
% number of calculated mesh points:
n=round(TSim/h);
%orders of derivatives, respectively:
q1=orders(1); q2=orders(2); q3=orders(3);
% constants of Chen's system:
r=parameters(1);
% binomial coefficients calculation:
cp1=1; cp2=1; cp3=1;
for j=1:n
c1(j)=(1-(1+q1)/j)*cp1;
c2(j)=(1-(1+q2)/j)*cp2;
c3(j)=(1-(1+q3)/j)*cp3;
cp1=c1(j); cp2=c2(j); cp3=c3(j);
end
% initial conditions setting:
x(1)=Y0(1); y(1)=Y0(2); z(1)=Y0(3);
% calculation of phase portraits /numerical solution/:
for i=2:n
x(i)=(10*(y(i-1)-x(i-1)))*h^q1 - memo(x, c1, i);
y(i)=(-x(i)*z(i-1)+(24-r*4)*x(i)+r*y(i-1))*h^q2 - memo(y, c2, i);
z(i)=(x(i)*y(i)-8/3*z(i-1))*h^q3 - memo(z, c3, i);
end
for j=1:n
Y(j,1)=x(j);
Y(j,2)=y(j);
Y(j,3)=z(j);
end
T=h:h:TSim;
[t,y]=FOchen([5], [0.95 0.95 0.95], 100, [-8.3 -10 12]);
figure
plot3(y(:,1), y(:,3), y(:,2), 'k');
xlabel('z(t)'); ylabel('x(t)'); zlabel('y(t)'); grid;
title('chenxiyinzi x,y,z')
Z1=[];Z2=[];Z3=[];
global a;
global b;
global r;
a=10;b=8/3;
for r=linspace(0,5,40);
y=[1;1;1;1;0;0;0;1;0;0;0;1];
lp=0;
for k=1:100
[T,Y]=FOchen([5], [0.95 0.95 0.95], 10, [-8.3 -10 12]);
y = Y(size(Y,1),:);
y0 = [y(4) y(7) y(10);
y(5) y(8) y(11);
y(6) y(9) y(12)];
y0=GS(y0);
mod(1)=norm(y0(:,1));
mod(2)=norm(y0(:,2));
mod(3)=norm(y0(:,3));
lp = lp+log(abs(mod));
y0(:,1)=y0(:,1)/mod(1);
y0(:,2)=y0(:,2)/mod(2);
y0(:,3)=y0(:,3)/mod(3);
y(4:12) = y0';
end
lp=lp/100;
Z1=[Z1 lp(1)];
Z2=[Z2 lp(2)];
Z3=[Z3 lp(3)];
end
r=linspace(0,5,40);
plot(r,Z1,'-',r,Z2,'-',r,Z3,'-');
title('Lyapunov exponents of Lorenz')
xlabel('parameter r'),ylabel('lyapunov exponents')
grid on
正交化;
function A = GS(V)
v1 = V(:,1);
v2 = V(:,2);
v3 = V(:,3);
a1 = zeros(3,1);
a2 = zeros(3,1);
a3 = zeros(3,1);
a1 = v1;
a2 = v2-((a1'*v2)/(a1'*a1))*a1;
a3 = v3-((a1'*v3)/(a1'*a1))*a1-((a2'*v3)/(a2'*a2))*a2;
A = [a1,a2,a3];
|