Maximum Lyapunov exponent with Ode45

4 views (last 30 days)
The Fool
The Fool on 7 Feb 2020
Untitled.png
I need to plot Maximum Lyapunov exponent for (x:,5) with variable A ranging (ex: from 1-100). Can you help me? Thank you so much.
function xdot = thefo2l(t,x)
global A
h = 0.002;
b = 160*h;
a = b;
k1 = 0;
k2 = 0;
k3 = 0;
m = 1;
n = 1;
epsilon = 0.1;
q=A*sin(100*t);
A11 =877889. ;
A12 =296675.;
A22 =2.82154*10^7;
A66 =3.02819*10^6 ;
D11 =11.9094 ;
D12 = 4.01856;
D22 =430.583 ;
D66 =1.561;
ro1=2.5954;
%%%%%%%
k11=((-1).*a.^(-2).*A11.*m.^2+(-1).*A66.*b.^(-2).*n.^2).*pi.^2;
k12=(-1).*a.^(-1).*(A12+A66).*b.^(-1).*m.*n.*pi.^2;
k13 = 0;
n1=(-4/9).*((-1)+(-1).^m).*((-1)+(-1).^n).*a.^(-3).*b.^(-2).*n.^(-1).*(2.*( ...
2+(-1).^n).*A11.*b.^2.*m.^2+(-1).*a.^2.*(A12+(-1).*(3+2.*(-1).^n).*A66) ...
.*n.^2).*pi;
k21=(-1).*a.^(-1).*(A12+A66).*b.^(-1).*m.*n.*pi.^2;
k22=((-1).*a.^(-2).*A66.*m.^2+(-1).*A22.*b.^(-2).*n.^2).*pi.^2;
k23=0;
n2=(-4/9).*((-1)+(-1).^m).*((-1)+(-1).^n).*a.^(-2).*b.^(-3).*m.^(-1).*((( ...
-1).*A12+(3+2.*(-1).^m).*A66).*b.^2.*m.^2+2.*(2+(-1).^m).*a.^2.*A22.* ...
n.^2).*pi;
k31 = 0;
k32 = 0;
k33=(-1).*a.^(-4).*b.^(-4).*(b.^4.*D11.*m.^4.*pi.^4+a.^2.*b.^2.*m.^2.* ...
pi.^2.*(b.^2.*k2+2.*(D12+2.*D66).*n.^2.*pi.^2)+a.^4.*(b.^4.*k1+b.^2.* ...
k2.*n.^2.*pi.^2+D22.*n.^4.*pi.^4));
n3=0;
n4=(-1/32).*a.^(-4).*b.^(-4).*(18.*a.^4.*b.^4.*k3+(3.*A11.*b.^4.*m.^4+2.* ...
a.^2.*(3.*A12+(-2).*A66).*b.^2.*m.^2.*n.^2+3.*a.^4.*A22.*n.^4).*pi.^4); ...
n5=(8/9).*((-1)+(-1).^m).*((-1)+(-1).^n).*a.^(-3).*b.^(-2).*n.^(-1).*(2.*( ...
2+(-1).^m).*(2+(-1).^n).*A11.*b.^2.*m.^2+a.^2.*(2.*(2+(-1).^m).*(2+(-1) ...
.^n).*A12+A66).*n.^2).*pi;
n6=(8/9).*((-1)+(-1).^m).*((-1)+(-1).^n).*a.^(-2).*b.^(-3).*m.^(-1).*((2.*( ...
2+(-1).^m).*(2+(-1).^n).*A12+A66).*b.^2.*m.^2+2.*(2+(-1).^m).*(2+(-1) ...
.^n).*a.^2.*A22.*n.^2).*pi;
n7=4.*((-1)+(-1).^m).*((-1)+(-1).^n).*m.^(-1).*n.^(-1).*pi.^(-2).*q;
%%%%%%%%%
xdot = zeros(6,1);
xdot(1) = x(2);
xdot(2) = (k11*x(1)+k12*x(3)+k13*x(5)+n1*x(5)^2)/ro1;
xdot(3) = x(4);
xdot(4) = (k21*x(1)+k22*x(3)+k23*x(5)+n2*x(5)^2)/ro1;
xdot(5) = x(6);
xdot(6) = (k31*x(1)+k32*x(3)+k33*x(5)+n3*x(5)^2+n4*x(5)^3+n5*x(1)*x(3)+n6*x(3)*x(5)+n7)/ro1-2*epsilon*x(6);
xdot = [xdot(1); xdot(2);xdot(3); xdot(4);xdot(5); xdot(6)];
%%%%%%%%%%%%%%%%%%
[t,x] = ode45(@thefo2l,[0 5*2*pi/100],[0 0.0001 0 0.0001 0 0.0001 ]);

Answers (0)

Categories

Find more on Matrix Computations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!