Find in Array of Strings
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
how do i find the row number for 'STG' in the following array of names as: 'asf' 'poif' 'STG' 'iam' 'no'
0 Kommentare
Akzeptierte Antwort
Matt Fig
am 28 Jun. 2011
Is your array a cell array or a character array? If it is a cell array,
A = {'asf'
'poif'
'STG'
'iam'
'no'}
strmatch('STG',A)
Or you can use:
find(strcmp(A,'STG'))
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu String Parsing 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!