plotting maximal lyapunov exponent using ode45
Mostrar comentarios más antiguos
i m in need to plot the lyapunov exponent 'f vs lyapunov,' but i am unable to run the program due to some error in the program. can anyone pls help me to get the plot and any suggestions to make it perfect.
with kind regards
matlab codes:
clc
global f
for f=0.0:0.1:30
f
initialx(1)=0.0100;initialx(2)=0.01;
lyap(1)=.01;
[t,x]=ode45('loreeneq',0:1:500,[initialx(1),initialx(2)]);
lyap1=lyap([t,x(:,1)]);
plot(f,lyap1,'r');
hold on
drawnow
end
xlabel ('f');ylabel('lyap')
--------------------------------------------------------------------------
function dxdt=loreeneq(t,x)
global r
dxdt1=10*(x(2)-x(1));
dxdt2=(r*x(1))-x(2)-(x(1)*x(3));
dxdt3=(x(1)*x(2))-(2.67*x(3));
dxdt=[dxdt1;dxdt2;dxdt3];
2 comentarios
Walter Roberson
el 9 de En. de 2012
It is faster for us if you show us the error message and the line it is complaining about.
Rizwana Junaid
el 10 de En. de 2012
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Computations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!