How to create 4D matrix with several 3D matrix??

6 次查看(过去 30 天)
I want to create 4D matrix (Nx150x150x150) with N of 3D matrix (150x150x150).
Could you give me some advice??

采纳的回答

Stephen23
Stephen23 2022-1-26
编辑:Stephen23 2022-1-26
C = {all of your N 3D array in one cell array};
A = permute(cat(4,C{:}),[4,1,2,3]);
But it would be simpler and more efficient to create a 150x150x150xN array:
A = cat(4,C{:});

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by