Add a integer at specific row
显示 更早的评论
I have a double vector of zeros; lets call it A which will be like;
A=[0,0,0,0,0,0,0,0,0,0,0,...,0]
I want to make specific rows as one for example if B=[2,6,7] are the row index that I want as one the result would be someting like;
Anew=[0,1,0,0,0,1,1,0,0,0,...,0]
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!