MATLAB: How do i split every digit of a string

digits

i have a string as '1111' how to split its digit as
num(1)=1
num(2)=1
num(3)=1
num(4)=1
I will always have numbers only in the string
thanks in advance

Best Answer

S = '1234'; % Say this is your string....
num = S - '0';
num(1)
num(2)
num(3)
Related Question