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!