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

try:
C = A;
C(:,6,:) = B;
Alan De maman
Alan De maman 2020년 11월 6일
Thank you Sindar, it worked as expected.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2020년 11월 6일

댓글:

2020년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by