Find cell containing part of a string.
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
sia ben
am 30 Jul. 2018
Beantwortet: Image Analyst
am 30 Jul. 2018
I have a cell "A" of strings like {'A0_V2'; 'A0_V1'; 'B2_V4';...}. I want to find which numbers of A contains 'A0'. The answer can be ans = (1, 2).
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 30 Jul. 2018
Try contains():
A = {'A0_V2'; 'A0_V1'; 'B2_V4'}
rowsWithString = contains(A, 'A0')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Cell Arrays 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!