How to Update matrix values
15 次查看(过去 30 天)
显示 更早的评论
I have a matrix[2 2:2 2]I want to update these four values one by one ie[3 3:3 3],[4 4:4 4],[5 5:5 5] like thgis I want to update ,,,how can i achieve this with script?
0 个评论
采纳的回答
更多回答(1 个)
Walter Roberson
2013-1-2
A = A + 1;
4 个评论
Walter Roberson
2013-1-2
If you want to see each updated value, you could remove the semi-colon from the addition
a(i) = a(i) + 1 %no semi-colon
另请参阅
类别
在 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!