How to solve this error?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Index in position 1 exceeds array bounds (must not exceed 17).
Everytime i am going to run my program i am getting this error ..How to solve it ?
0 commentaires
Réponse acceptée
KSSV
le 12 Mai 2022
The error is clear. It seems you have an array of size 1x17 and you are trying to extract elements more than present in it.
% Example
A = rand(1,5) ; % aarray of size 1x5. It has only five elements
A(1) % no error
A(5) % no error
A(end) % no error
A(6) % error, there is no sixth element and index should not exceed 5.
So, check your code for dimensions of the array from which you are accessing the elements.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!