matrix 1xn MatLab

1 次查看(过去 30 天)
Takim Mustakim
Takim Mustakim 2022-11-8
编辑: Arif Hoq 2022-11-8
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

采纳的回答

Arif Hoq
Arif Hoq 2022-11-8
编辑:Arif Hoq 2022-11-8
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by