how can i get output
1 回表示 (過去 30 日間)
古いコメントを表示
input: "391632"
i want output:
i=39, j=1632
how can i get it??
採用された回答
その他の回答 (3 件)
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)'];
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!