Index in position 2 exceeds array bounds (must not exceed 14).
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Alan Stevens
le 18 Oct 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 commentaires
Alan Stevens
le 18 Oct 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!
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!