extracting digits from a number

26 次查看(过去 30 天)
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?

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by