フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how can i get output

2 ビュー (過去 30 日間)
mukim
mukim 2013 年 1 月 16 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
input sample: x=[43 03 00 10]
output sample: y= 43030010
how can i get this output ???

回答 (3 件)

Andrei Bobrov
Andrei Bobrov 2013 年 1 月 16 日
if
x = [43 3 0 10]; % double array
y = x*10.^(6:-2:0);

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 1 月 16 日
編集済み: Azzi Abdelmalek 2013 年 1 月 16 日
x= [43 3 0 10]
y=[]
for k=1:numel(x)
y=[y num2str(x(k))];
end
y=str2num(y);
%or
y=str2num(cell2mat(arrayfun(@num2str,x,'un',0)))

Thorsten
Thorsten 2013 年 1 月 16 日
編集済み: Thorsten 2013 年 1 月 16 日
str2num(sprintf('%02d', x))

この質問は閉じられています。

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by