Index in position 2 exceeds array bounds (must not exceed 2171).
์กฐํ ์: 1 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
muhammad ilyas khattak khattak
2022๋
1์ 31์ผ
ํธ์ง: Cris LaPierre
2022๋
1์ 31์ผ
Dear members of this forum, โบ๐๐๐ป๐โบ
I hope and pray that you people will be good and happy....
I am receiving this error "Index in position 2 exceeds array bounds (must not exceed 2171)."... I append red-colored screenshot/snapshot of the received error and also the updated MATLAB code for convenience of the member who may become of help to me in this matter...
I scrolled through my MATLAB code several times but no success so far since few days...Therefore, I am posting here on this forum... Already I posted to one of my already going another query on this forum, MathWorks but response still awaited... Therefore, I had to post here also...
Relevant possible solution is requested... ๐โบ๐๐
Many thanks in advance
AllinOne14January2022V1
๋๊ธ ์: 0
์ฑํ๋ ๋ต๋ณ
Cris LaPierre
2022๋
1์ 31์ผ
ํธ์ง: Cris LaPierre
2022๋
1์ 31์ผ
I don't understand how you came up with the calculation for ravailk, but the sum of all the sizes is leading to a number greater than the total number of columns (position 2) in x.
The result of this calculation is 100000816 while the total number of columns in x is indicated in the top of the error message (1865 here, but it appears to change every run).
floor(Numtk+size(ttransij,2)+ size(texeij,2)+ size(D_Cloud,2)+size(F_Cloud,2)+...
size(MuRSU,2)+size(MaxNumtk,2)+size(E,2)+size(DPrc,2)+size(pc,2)+size(Muc,2)+...
size(Mui,2)+size(Muk,2)+size(B,2)+size(pi)+size(pm,2)+size(W,2)+size(Wfog,2)+...
size(t,2)+size(T,2)+size(cdk,2)+size(j,2)+size(i,2)+size(TasksperVehicle,2)+...
size(NTotal,2)+size(Numv,2)+size(Numtk,2)+size(TijPrime,2)+size(loop1,2)+...
size(Fprime,2)+size(PhikPrime,2)+size(D,2)+size(F,2)+Numv)
It is also interesting that the result is a 1x2 vector. It is probably supposed to be a scalar. You can fix that by replacing size(pi) with size(pi,2).
๋๊ธ ์: 0
์ถ๊ฐ ๋ต๋ณ (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!