How can I find the common elements of 2 cell arrays of strings?
조회 수: 64 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2014년 4월 14일
답변: MathWorks Support Team
2014년 4월 14일
I have 2 cell arrays containing strings. I would like to find the elements that are common to both arrays and get their positions. Is there a function to do that?
채택된 답변
MathWorks Support Team
2014년 4월 14일
Use the "intersect" function as follows:
>> [C,ia,ib] = intersect(A,B, 'stable');
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!