필터 지우기
필터 지우기

How to split a 3D matrix into multiple 2D matrices

조회 수: 21 (최근 30일)
Chao Zhang
Chao Zhang 2021년 6월 6일
댓글: Chao Zhang 2021년 6월 6일
Now I have a 36x9xN three-dimensional matrix, N is a variable. How to split this three-dimensional matrix into N 36x9 two-dimensional matrices? (for example, N=3)

채택된 답변

Manas Minnoor
Manas Minnoor 2021년 6월 6일
Hi Chao,
Please refer to the following links which explain in detail how to use cell arrays to accomplish this.
However, just indexing into the 3D matrix will be much easier than creating multiple 2D matrices. Only if it is required should you create the N 2D matrices.
You may use the mat2cell function, whose documentation is listed below:
Hope this helps.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by