How do I determine if a word has a certain character in it?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
TastyPastry
2015년 11월 4일
편집: TastyPastry
2015년 11월 4일
If you only want to know whether or not the letter is in the word...
hasLetter = any(myWord == 'c');
댓글 수: 1
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!