a = [0 0 0 0 0 0 0 0 0 0];
b = [1 2 3];
how to make: c = [1 2 3 0 0 0 0 0 0 0]; from a and b

 Respuesta aceptada

Arif Hoq
Arif Hoq el 8 de Nov. de 2022
Editada: Arif Hoq el 8 de Nov. de 2022

0 votos

a = [0 0 0 0 0 0 0 0 0 0];
b = [1 2 3];
a(1:length(b))=b;
c=a
c = 1×10
1 2 3 0 0 0 0 0 0 0

Más respuestas (0)

Categorías

Productos

Versión

R2021a

Preguntada:

el 8 de Nov. de 2022

Editada:

el 8 de Nov. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by