Extract values by matching column values

18 Ansichten (letzte 30 Tage)
novice modeler
novice modeler am 10 Mai 2017
Kommentiert: novice modeler am 11 Mai 2017
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 Kommentare
KSSV
KSSV am 11 Mai 2017
Give the out put which you expect.
novice modeler
novice modeler am 11 Mai 2017
4;10

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Andrei Bobrov
Andrei Bobrov am 11 Mai 2017
[C,ia,ib] = setxor(a',b','rows');
out = C';

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by