How to merge two different size matrix logically?
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone, i have one matrix A = [0,1,2,...3600] and another one is B=[2,5,7,3600] what i want is to have matrix C(:,1)=[0,1,2....,3600] C(:,2)=[0,0,2,0,0,5,....3600] it should be as same size as A and if elements of B exist in A and that should be in the second column of C and the rest will be zero. Can you help please?
0 个评论
采纳的回答
更多回答(2 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!