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).

 採用された回答

Image Analyst
Image Analyst 2018 年 7 月 30 日

0 投票

Try contains():
A = {'A0_V2'; 'A0_V1'; 'B2_V4'}
rowsWithString = contains(A, 'A0')

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Characters and Strings についてさらに検索

製品

リリース

R2018a

タグ

質問済み:

2018 年 7 月 30 日

回答済み:

2018 年 7 月 30 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by