How do I determine if a word has a certain character in it?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rebecca Hussey
am 4 Nov. 2015
Kommentiert: Image Analyst
am 5 Nov. 2015
How do I determine if a word has a certain character in it?
For example if I have a word ?????? and want to know if the letter c is in it?
0 Kommentare
Akzeptierte Antwort
TastyPastry
am 4 Nov. 2015
Bearbeitet: TastyPastry
am 4 Nov. 2015
If you only want to know whether or not the letter is in the word...
hasLetter = any(myWord == 'c');
1 Kommentar
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!