Detection of objects
1 次查看(过去 30 天)
显示 更早的评论
Subscript indices must either be real positive integers or logicals
0 个评论
采纳的回答
Sean de Wolski
2011-2-4
is 0 a "real positive integer"?
Unlike other languages, MATLAB begins indexing at 1. e.g.
x(0) => your_error
x(1) => indexes first element
更多回答(1 个)
Vieniava
2011-2-4
in Matlab vector/matrix indexing starts from 1, not from 0, so you should change for-loop starting value on 1 .
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Entering Commands 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!