how to concatenate matrix in Matlab
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{:});
精彩评论