Find a common element between two matrices of different sizes

3 ビュー (過去 30 日間)
SANGHAMITRA MISHRA
SANGHAMITRA MISHRA 2017 年 9 月 29 日
回答済み: OCDER 2017 年 9 月 29 日
I have two matrices: A=[4, 2, 3, 11, 16, 19, 5, 32] B=[11, 31, 7, 92]
I want to find out the element common in both these vectors. i.e., I want to find the element 11 as my output. How to get this done?

採用された回答

OCDER
OCDER 2017 年 9 月 29 日
Use intersect .
C = intersect(A, B)
C =
11

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Math についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by