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

6 Ansichten (letzte 30 Tage)
Chao Zhang
Chao Zhang am 6 Jun. 2021
Kommentiert: Chao Zhang am 6 Jun. 2021
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)

Akzeptierte Antwort

Manas Minnoor
Manas Minnoor am 6 Jun. 2021
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.

Weitere Antworten (0)

Kategorien

Mehr zu Operators and Elementary Operations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by