How can I find the common elements of 2 cell arrays of strings?
65 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 14 Apr. 2014
Beantwortet: MathWorks Support Team
am 14 Apr. 2014
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?
Akzeptierte Antwort
MathWorks Support Team
am 14 Apr. 2014
Use the "intersect" function as follows:
>> [C,ia,ib] = intersect(A,B, 'stable');
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!