How to check the numbers of characters of a string?
이전 댓글 표시
e.g I have a string, abcde. And I need a checker to check whether the string has 5 characters before executing a command.
채택된 답변
추가 답변 (4개)
Sean de Wolski
2012년 10월 31일
Pedro's code with numel as the size check:
numel(str)==5
manoj saini
2012년 10월 31일
0 개 추천
>>a='string'; >>n=length(a) so n will return length of a string
카테고리
도움말 센터 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!