Is there any command to plot maximal lyapunov exponent from time series for which i tried my own codes. but still i m in a stage where i get the error:
r =
0
??? Subscript indices must either be real positive integers or logicals.
Error in ==> mlcmainbifr at 10 lyap1=lyap([t,x(:,1)]); pls help me in giving any idea and best suggestions.
kinds regards matlab codes:
clc
global r
for r=0.0:0.1:30 r
lyap(1)=.01;
[t,x]=ode45('loreeneq',0:1:500,[.01,.01,.01]);
lyap1=lyap([t,x(:,1)]);
plot(r,lyap1,'r');
drawnow
end
xlabel ('r');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];
Best Answer