![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1535675/image.png)
Index exceeds the number of array elements
조회 수: 2 (최근 30일)
이전 댓글 표시
>> 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
댓글 수: 0
답변 (1개)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1535675/image.png)
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
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!