How to check the numbers of characters of a string?
Mostra commenti meno recenti
e.g I have a string, abcde. And I need a checker to check whether the string has 5 characters before executing a command.
Risposta accettata
Più risposte (4)
Sean de Wolski
il 31 Ott 2012
Pedro's code with numel as the size check:
numel(str)==5
manoj saini
il 31 Ott 2012
0 voti
>>a='string'; >>n=length(a) so n will return length of a string
Ze Kai Ng
il 31 Ott 2012
0 voti
Ze Kai Ng
il 31 Ott 2012
0 voti
Categorie
Scopri di più su Develop Apps Using App Designer in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!