如何在Matlab中连接矩阵

3

我在Matlab中有n个dxd矩阵,我想将它们连接起来得到一个dxdxn矩阵,其中(:,:,i)是第i个矩阵(i=1..n)。我该如何做?

1个回答

7
使用 CAT
out = cat(3,mat1,mat2,mat3,...,matN);

如果数组是单元数组的元素,
out = cat(3,cellArray{:});

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接