generate matrix by for loop
显示 更早的评论
A=[1 -10 4
0 -2 7
5 1 9]
I need to get
A=[1 0 -10 0 4
0 0 -2 0 7
5 0 1 0 9]
by for loop
1 个评论
David Meissner
2022-6-6
I would look into "Indexing with a Single Index" here: https://www.mathworks.com/help/matlab/math/array-indexing.html
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!