Add 2d array in a 3d array

12 ビュー (過去 30 日間)
Alan De maman
Alan De maman 2020 年 11 月 6 日
コメント済み: Alan De maman 2020 年 11 月 6 日
I have a matrix A = rand(10,5,10) and a matrix B = rand(10,10) and i would like to concatenate then along the second axis into a matrix C of shape (10,6,10)
  2 件のコメント
Sindar
Sindar 2020 年 11 月 6 日
try:
C = A;
C(:,6,:) = B;
Alan De maman
Alan De maman 2020 年 11 月 6 日
Thank you Sindar, it worked as expected.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by