How to split a 3D matrix into multiple 2D matrices
40 次查看(过去 30 天)
显示 更早的评论
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)
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!