フィルターのクリア

Find index of cell containing strings from cell array

1 回表示 (過去 30 日間)
Shana Hartel
Shana Hartel 2017 年 8 月 30 日
回答済み: Jan 2017 年 8 月 30 日
How can I find the indices of cell A that contain any of the strings in cell B?
Example: A = cell(100,10). In column 2, I have a variety of fruits: apples, bananas, pears, grapes, rasberries etc. Some repeat. B = {'Apples', 'bananas', 'grapes'}
I want to find all the rows of A(:,2) that contain any of the strings in B.
Thanks!

採用された回答

Jan
Jan 2017 年 8 月 30 日
ismember(A(:, 2), B)

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by