MATLAB: How can I filter the nth character from categorical

categoricalMATLAB

i have a categorical value a, looks like:
a = 888-2018-02160001
Now I want the 10th and 11th character, the '02'.
I already tried a(10:11), but that doesn't work, because the length of a is 1. Also when I try string(a), the length is still 1
How can I filter these characters from a categorical?

Best Answer

>>a = '888-2018-02160001'
a(10:11)
ans =
'02'