Combine 2D matrices to form 3D one in Matlab

前端 未结 2 1570
旧时难觅i
旧时难觅i 2021-01-20 16:59

I have 3 20x2 double arrays A, B and C. I want to combine them in one 3d array D so that D(:,:,1)

2条回答
  •  被撕碎了的回忆
    2021-01-20 17:26

    Using cat to concatenate along the third dimension might be the elegant way -

    D = cat(3,A,B,C)
    

    Here, the first input argument 3 specifies the dimension along which the concatenation is to be performed.

提交回复
热议问题