adding a zero element in a specific location in array (between two elements)
显示 更早的评论
I have two array. one is 100x1 which contain two zeros elements and a shorter arrray with 98x1 elements which does not has zeros elements
I need to insert the same zeros locations of A matrix in B matrix locations to make it 100x1.
回答(1 个)
Matt J
2023-4-27
C=A;
C(logical(A))=B; %C is the result
类别
在 帮助中心 和 File Exchange 中查找有关 Operators and Elementary Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!