Find cell containing part of a string.

13 ビュー (過去 30 日間)
sia ben
sia ben 2018 年 7 月 30 日
回答済み: Image Analyst 2018 年 7 月 30 日
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 日
Try contains():
A = {'A0_V2'; 'A0_V1'; 'B2_V4'}
rowsWithString = contains(A, 'A0')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by