Indexing array to multiple substrings
Show older comments
Hi all,
I have a nx1 cell array (called names), each cell containing characters. For example
names={'A_info','B_info','C_info','D_info'}
I have another mx1 cell array (called tags) with tags that I know exist in the nx1 cell array and I want to find the whole string which contains any of the tags and which is stored in the nx1 cell. E.g.
tags={'A','B'}
Is there a way, without a loop, to find the total string containing substrings in tags? That is, using tags I want to find the full strings A_info and B_info, but not C_info and D_info
Thanks in advance for the help!
Accepted Answer
More Answers (1)
Erik Lamers
on 18 Aug 2017
0 votes
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!