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

조회 수: 12 (최근 30일)
SEO BOIL
SEO BOIL 2022년 1월 26일
편집: Stephen23 2022년 1월 26일
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