how can i get output

input: "391632"
i want output:
i=39, j=1632
how can i get it??

 采纳的回答

更多回答(3 个)

Andrei Bobrov
Andrei Bobrov 2013-1-16
编辑:Andrei Bobrov 2013-1-16
s = '391632';
out = str2double(mat2cell(s,1,[2 4]));
or
a = s - '0';
out = [polyval(a(1:2),10), polyval(a(3:end),10)];
or
a = s - '0';
out = [a(1:2)*[10; 1], a(3:end)*10.^(3:-1:0)'];
mukim
mukim 2013-1-16

0 个投票

the input is numeric input: 391632
mukim
mukim 2013-1-16

0 个投票

tnx.. Walter Roberson .. :)

类别

帮助中心File Exchange 中查找有关 Scatter Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by