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!