Index exceeds array bounds
显示 更早的评论
I've been trying to implement the following piece of code (function)...
.png)
but, I get this message in the command window:
Error in LSTMTest>prepareDataTest (line 212)
X = XTest{i};
I looked at similar cases in the forum, but still...
Please how can I solved this issue?
Thank you for your time!
Best regards,
3 个评论
Mario Chiappelli
2019-7-23
The best way to troubleshoot problems with indexing issues is to look at what is actually stored in the variables in the watch menu on the right hand side of the matlab screen. Check to see if XTest has anything actually stored into it (that would be my first guess, since it can't access the ith element of XTest. Maybe it does not exist).
Pierre Guy
2019-7-23
Adam
2019-7-23
Use the debugger and the Pause on errors option. It will land you in the code at the exact location and index within the for loop that the error occurs. Then it will be trivial to see in the workspace and/or using command line what the problem is.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!