Index in position 2 exceeds array bounds (must not exceed 14).
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
C(1,1)= 1; C(1,10) =-1; C(1,16) = 1
C(2,2) = 1; C(2,10) = 1; C(2,11) =-1;
C(3,3) = 1; C(3,11) = 1; C(3,12) = -1;
C(4,4) = 1; C(4,8) = 1; C(4,13) = -1;
C(5,5) = 1; C(5,4) = 1; C(5,14) = -1;
C(6,6) = 1; C(6,8) = 1; C(6,9) = 1; C(6,15) = 1;
C(7,7) = 1; C(7,15) = 1; C(7,16) = -1;
C(8,8) = 1; C(8,17) = -1;
C(9,9) = 1; C(9,17) = 1;
----------------------------------------------------------------
>> C(9,17)
Index in position 2 exceeds array bounds (must not exceed 14).
0 Kommentare
Antworten (1)
Alan Stevens
am 18 Okt. 2020
Odd! It works for me:
>> C(1,1)= 1; C(1,10) =-1; C(1,16) = 1;
C(2,2) = 1; C(2,10) = 1; C(2,11) =-1;
C(3,3) = 1; C(3,11) = 1; C(3,12) = -1;
C(4,4) = 1; C(4,8) = 1; C(4,13) = -1;
C(5,5) = 1; C(5,4) = 1; C(5,14) = -1;
C(6,6) = 1; C(6,8) = 1; C(6,9) = 1; C(6,15) = 1;
C(7,7) = 1; C(7,15) = 1; C(7,16) = -1;
C(8,8) = 1; C(8,17) = -1;
C(9,9) = 1; C(9,17) = 1;
>> C(9,17)
ans =
1
3 Kommentare
Alan Stevens
am 18 Okt. 2020
I don't know! The only change I made was to put a semicolon after C(1,16), but I can't imagine that made a real difference!
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!