Extract values by matching column values

조회 수: 16 (최근 30일)
novice modeler
novice modeler 2017년 5월 10일
댓글: novice modeler 2017년 5월 11일
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일
[C,ia,ib] = setxor(a',b','rows');
out = C';

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by