필터 지우기
필터 지우기

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