Find a common element between two matrices of different sizes

조회 수: 8 (최근 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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by