How can I find the common elements of 2 cell arrays of strings?
65 次查看(过去 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!