Index exceeds the number of array elements
2 views (last 30 days)
Show older comments
>> 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 Comments
Answers (1)
Neelanshu
on 10 Nov 2023
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
0 Comments
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!