开发者

how to concatenate matrix in Matlab

开发者 https://www.devze.com 2023-02-19 22:31 出处:网络
I have n dxd matrices in Matlab and I want to concatenate them to get a dxdxn matrix where (:,:,i) is the i^th matrix (i=1..n). How can I do th开发者_如何学JAVAis?Use CAT

I have n dxd matrices in Matlab and I want to concatenate them to get a dxdxn matrix where (:,:,i) is the i^th matrix (i=1..n). How can I do th开发者_如何学JAVAis?


Use CAT

out = cat(3,mat1,mat2,mat3,...,matN);

If the arrays are elements of a cell array,

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

精彩评论

暂无评论...
验证码 换一张
取 消