Add 2d array in a 3d array

20 visualizaciones (últimos 30 días)
Alan De maman
Alan De maman el 6 de Nov. de 2020
Comentada: Alan De maman el 6 de Nov. de 2020
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 comentarios
Sindar
Sindar el 6 de Nov. de 2020
try:
C = A;
C(:,6,:) = B;
Alan De maman
Alan De maman el 6 de Nov. de 2020
Thank you Sindar, it worked as expected.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by