How to make a matrix with negative indexes?
21 次查看(过去 30 天)
显示 更早的评论
I keep trying to make a matrix with negative indexes but this error pops up: Array indices must be positive integers or logical values. Does anyone know how to fix this?
1 个评论
Stephen23
2019-4-19
It sounds as if you might be trying to define a function of an independent variable. Please explain your algorithm in more detail.
回答(2 个)
Walter Roberson
2019-4-19
Modify
Another approach is to sprintf() the list of indices into a character vector, and use that as a key for containers.Map() . Some work would be involved if you wanted to use : indices or range indices.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!