error in plotting lyapunov exponent from time series
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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];
0 Kommentare
Akzeptierte Antwort
Andrew Newell
am 10 Jan. 2012
Is lyap supposed to be a variable or the function in the Control Toolbox? If the former, you can't index it with t and x because they are real variables, not integers. I can't suggest a fix because I don't know what you are trying to do in enough detail.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Computations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!