I am using R2018b, and trying to use the function 'validtaestring', but it doesn't find a partial match. Has anyone tried that in this version?
Mostrar comentarios más antiguos
STR2={'AA_UCECC'};
str='UCE';
validatestring(str,STR2)
Expected input to match one of these values:
'AA_UCECC'
The input, 'UCE', did not match any of the valid values.
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 20 de Nov. de 2018
To find partial matches, don't use validatestring(). Use contains
validString = contains(str, STR2);
1 comentario
Guy Nir
el 20 de Nov. de 2018
Categorías
Más información sobre Characters and Strings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!