Index exceeds the number of array elements. Index must not exceed 10000.
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
DAYANANDA B N
le 29 Mar 2023
Commenté : DAYANANDA B N
le 29 Mar 2023
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1339519/image.png)
How can I solve this issue ?
0 commentaires
Réponse acceptée
Torsten
le 29 Mar 2023
My guess is that "Ytrain" has less than "len" elements.
To confirm this, add the lines
disp(len)
disp(size(Ytrain))
after the line
[wid,len] = size(Xtrain)
to your code and tell us what is displayed.
Plus de réponses (0)
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!