필터 지우기
필터 지우기

error in plotting lyapunov exponent from time series

조회 수: 1 (최근 30일)
Rizwana Junaid
Rizwana Junaid 2012년 1월 10일
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];

채택된 답변

Andrew Newell
Andrew Newell 2012년 1월 10일
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.
You might be able to use Calculation Lyapunov Exponents for ODE from the File Exchange.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Computations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by