How to solve this error?
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
KSSV
2022-5-12
The error is clear. It seems you have an array of size 1x17 and you are trying to extract elements more than present in it.
% Example
A = rand(1,5) ; % aarray of size 1x5. It has only five elements
A(1) % no error
A(5) % no error
A(end) % no error
A(6) % error, there is no sixth element and index should not exceed 5.
So, check your code for dimensions of the array from which you are accessing the 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!