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

2 件のコメント

KSSV
KSSV 2017 年 5 月 11 日
Give the out put which you expect.
novice modeler
novice modeler 2017 年 5 月 11 日
4;10

サインインしてコメントする。

回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2017 年 5 月 11 日

0 投票

[C,ia,ib] = setxor(a',b','rows');
out = C';

カテゴリ

ヘルプ センター および File ExchangeNumeric Types についてさらに検索

質問済み:

2017 年 5 月 10 日

コメント済み:

2017 年 5 月 11 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by