MATLAB: Splitting a char with no delimiter

split stringuse strings to index

Hi,
Does anyone know how to split a four character cell array string into 2(or better 4) separate strings? A= 'A5C9' %splitting into A1=A5 A2=C9
or even better something like A(1)=A A(2)= 5 A(3)= C A(4)= 9 so that I could use them to index a larger array?
For clarity this question was incorrectly posed, the problem was having a char within a cell, and needing to extract the char and index it. My bad for not realising the differences between strings and chars and should not have written {'…'}, much thanks to all who helped clarify.
Best regards
Steve

Best Answer

when I look in my code A(1) gives me 'A2C9', not the individual 'A
As I pointed out
A = {'A2C9'}
is not the same thing as
A = 'A2C9'
The former is a cell array. A container, which in this case has only one element, a char array. If your cell array only ever has one element, then you don't need it.
Note that if
A = {'A2C9'}
then A(1) is still {'A2C9'}, exactly the same cell array. Older versions of matlab did not display the enclosing {}, a source of confusion. Newer versions of matlab no longer do this. To get the content of the cell array, you use {} to index it:
>> A = {'A2C9'}
A =
1×1 cell array
{'A2C9'}
>> A{1}
ans =
'A2C9'
>> A{1}(1)
ans =
'A'