How to check if a string is an element of a string set?
Show older comments
For example the set is {"aaa" "bbb" "ccc"} and I want to check if mystring == "aaa" mystring == "bbb" mystring == "ccc" But in general, I would like to collect and represent the set in a data structure, and make the check as simple as possible.
Answers (1)
Image Analyst
on 29 Jun 2015
1 vote
The ismember() function is used for this purpose.
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!