MATLAB: Extracting digits from a number

digits

Hi,
I have a column of numbers with the following format: 12345678 I want to extract digits 56 and digits 78 . in a way similar to the mid and right functions in excel . How can I do so?

Best Answer

a=[1234;12345678;3456];
b=num2str(a);
c=b(:,5:6)
d=b(:,7:8)
e=str2num(c)
f=str2num(d)