How to replace zero with a number in null matrix at required position
2 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Raj
2019-6-19
I see no specific pattern in your modified matrix. So just use proper indexing to insert the required number at required location.
A=zeros(5)
A(1,5)=7
A(2,2)=8
A(3,5)=2
A(4,2)=4
A(5,3)=1
Its quite trivial so I am not sure if this is what you are looking for.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Title 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!