Find in Array of Strings
3 ビュー (過去 30 日間)
古いコメントを表示
how do i find the row number for 'STG' in the following array of names as: 'asf' 'poif' 'STG' 'iam' 'no'
0 件のコメント
採用された回答
Matt Fig
2011 年 6 月 28 日
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'))
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で String Parsing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!