MATLAB: 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

MATLABvalidatestring

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.

Best Answer

Seems like validatestring only searches first n characters. Therefore I am using strfind.
Thank you,
GUy