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 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

製品

リリース

R2021a

質問済み:

2022 年 11 月 8 日

編集済み:

2022 年 11 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by