Clear Filters
Clear Filters

matrix 1xn MatLab

1 view (last 30 days)
Takim Mustakim
Takim Mustakim 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];
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)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!