How to check the numbers of characters of a string?
Afficher commentaires plus anciens
e.g I have a string, abcde. And I need a checker to check whether the string has 5 characters before executing a command.
Réponse acceptée
Plus de réponses (4)
Sean de Wolski
le 31 Oct 2012
Pedro's code with numel as the size check:
numel(str)==5
manoj saini
le 31 Oct 2012
0 votes
>>a='string'; >>n=length(a) so n will return length of a string
Ze Kai Ng
le 31 Oct 2012
0 votes
Ze Kai Ng
le 31 Oct 2012
0 votes
Catégories
En savoir plus sur Develop Apps Using App Designer dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!