Index exceeds the number of array elements. Index must not exceed 10000.
5 views (last 30 days)
Show older comments
How can I solve this issue ?
0 Comments
Accepted Answer
Torsten
on 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.
More Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!