Extract values by matching column values
显示 更早的评论
Friends, I have two matrices, a and b. a= [ 1 2 3 ; 4 5 6] and b = [1 2 3 4 ; 4 5 6 10]. I want to extract the fourth column of matrix b by matching first three columns of a & b.
Thanks
回答(1 个)
Andrei Bobrov
2017-5-11
[C,ia,ib] = setxor(a',b','rows');
out = C';
类别
在 帮助中心 和 File Exchange 中查找有关 Numeric Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!