How to find the corresponding position in a string
Afficher commentaires plus anciens
How to find the corresponding string in a string set test_str = ['a';'b';'c'] test_str = 'a' 'b' 'c' How can i find out c and the output string is at position 3 of c
Réponses (2)
test_str={'a','b','c'};
[exists,location]=ismember('c',test_str)
test_str=['a','b','c']
location = strfind(test_str,'c')
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!