problem while using 'intersect' between strings
Ältere Kommentare anzeigen
Hi:
I have two strings:
s1='bound10-wall1.out'
s2='bound10-wall24.out'
and I need the intersect between them, then, I use the result posted here: https://www.mathworks.com/matlabcentral/answers/125711-how-can-i-find-the-common-elements-of-2-cell-arrays-of-strings
[C,ia,ib] = intersect(s1,s2, 'stable');
the result is:
C='bound10-wal.t'
however, I think the expected result should be:
'bound10-wall.out'
so I would like to know if there is any mistake with my understanding?
Thanks!
Yu
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!