Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how can i get output

2 visualizaciones (últimos 30 días)
mukim
mukim el 16 de En. de 2013
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
input sample: x=[43 03 00 10]
output sample: y= 43030010
how can i get this output ???

Respuestas (3)

Andrei Bobrov
Andrei Bobrov el 16 de En. de 2013
if
x = [43 3 0 10]; % double array
y = x*10.^(6:-2:0);

Azzi Abdelmalek
Azzi Abdelmalek el 16 de En. de 2013
Editada: Azzi Abdelmalek el 16 de En. de 2013
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 el 16 de En. de 2013
Editada: Thorsten el 16 de En. de 2013
str2num(sprintf('%02d', x))

La pregunta está cerrada.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by