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

 Accepted Answer

Arif Hoq
Arif Hoq on 8 Nov 2022
Edited: Arif Hoq on 8 Nov 2022
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

More Answers (0)

Categories

Products

Release

R2021a

Asked:

on 8 Nov 2022

Edited:

on 8 Nov 2022

Community Treasure Hunt

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

Start Hunting!