selecting desired row

7 ビュー (過去 30 日間)
kash
kash 2012 年 1 月 18 日
I have 2 matrix
A=[10 50 69
8 9 10;
79 52 63]
B=[5; 79;7 ]
now i want to dispaly row A corresponding to B (i.e)i want to comapare 1st columns of A and B,i want to display which is present in both A and B(1st column)...
in this A and B only 79 is present so i wnat to dispaly as
79 52 63
i have 1000x6 matrices

採用された回答

Walter Roberson
Walter Roberson 2012 年 1 月 18 日
A(ismember(A(:,1), B), :)

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by