How to check the numbers of characters of a string?
Mostrar comentarios más antiguos
e.g I have a string, abcde. And I need a checker to check whether the string has 5 characters before executing a command.
Respuesta aceptada
Más respuestas (4)
Sean de Wolski
el 31 de Oct. de 2012
Pedro's code with numel as the size check:
numel(str)==5
manoj saini
el 31 de Oct. de 2012
0 votos
>>a='string'; >>n=length(a) so n will return length of a string
Ze Kai Ng
el 31 de Oct. de 2012
0 votos
Ze Kai Ng
el 31 de Oct. de 2012
0 votos
Categorías
Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!