Error and can't find whats causing index exceed matrix dimension
2 次查看(过去 30 天)
显示 更早的评论
I'm getting this:
Index exceeds matrix dimensions.
Error in Test3 (line 51)
if (status == 0) && (a(1) > a(2))
Although it says the line, but I can't find what is actually causing it. All the cells have same dimensions. Please help
2 个评论
the cyclist
2016-12-28
编辑:the cyclist
2016-12-28
What is the calling syntax of the functions?
Also, maybe I missed it, but I don't see any reference to an object called "Test3" in what you uploaded.
采纳的回答
Walter Roberson
2016-12-28
bb{1,5}(:,7) does not match datenumber at all, causing k{5} to be empty, which cases b{5} to be empty, which causes a=b{t} to be empty. Your code assumes a has at least 6 elements.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!