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 Exchange에서 Numeric 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