필터 지우기
필터 지우기

Index exceeds the number of array elements

조회 수: 2 (최근 30일)
rohini more
rohini more 2022년 5월 25일
답변: Neelanshu 2023년 11월 10일
>> run_LE_FO_a
p_step =
1.499999999999999e-03
Index exceeds the number of array elements. Index must not exceed 1.
Error in LE_RF_a (line 5)
X= [x(5), x(9), x(13), x(17);
Error in FDE12>f_vectorfield (line 300)
f = feval(Probl.fdefun,t,y,Probl.param) ;
Error in FDE12 (line 114)
f_temp = f_vectorfield(t0,y0(:,1),Probl) ;
Error in FO_Lyapunov_a (line 22)
[T,Y] = FDE12(q,ext_fcn,t,t+h_norm,[0 0 1 1],h,a);
Error in run_LE_FO_a (line 16)
lp=FO_Lyapunov_a(ne,ext_fcn,0,0.2,1,[0 0 1 1],0.2,1,a)
>>
fde12 only work on 3 dimensional? if you want to work on 4 dimensional where i have to change

답변 (1개)

Neelanshu
Neelanshu 2023년 11월 10일
Hi Rohini,
I understand that you are facing issue when working on 4-dimensional vector as input argument in ‘FDE12.m’.
I have debugged the code and found that while using 4 dimensions, in 'LE_RF_a.m' you are accessing 5th 6th 7th elements etc which is the cause of error, as shown below:
Also refer to line 114 in 'FDE12', it should be like shown below as y0 is a row vector
f_temp = f_vectorfield(t0,y0(1,:),Probl) ;
instead of
f_temp = f_vectorfield(t0,y0(:,1),Probl) ;
Hope it helps,
Regards,
Neelanshu

카테고리

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

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by