How to check the numbers of characters of a string?
Ältere Kommentare anzeigen
e.g I have a string, abcde. And I need a checker to check whether the string has 5 characters before executing a command.
Akzeptierte Antwort
Weitere Antworten (4)
Sean de Wolski
am 31 Okt. 2012
Pedro's code with numel as the size check:
numel(str)==5
manoj saini
am 31 Okt. 2012
0 Stimmen
>>a='string'; >>n=length(a) so n will return length of a string
Ze Kai Ng
am 31 Okt. 2012
0 Stimmen
Ze Kai Ng
am 31 Okt. 2012
0 Stimmen
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!