PDA

查看完整版本 : 如何在Matlab中连接矩阵


poster
2019-12-14, 20:46
我在Matlab中有n个dxd矩阵,我想将它们连接起来以获得dxdxn矩阵,其中(:,:,i)是第i个矩阵(i = 1..n)。我怎样才能做到这一点?



回答:

使用CAT (http://www.mathworks.com/help/techdoc/ref/cat.html)

out = cat(3,mat1,mat2,mat3,...,matN); 如果数组是单元数组的元素,

out = cat(3,cellArray{:});

更多&回答... (https://stackoverflow.com/questions/5452005)