How to split a 3d matrix into sub-3d matrices?
4 views (last 30 days)
Bruno Luong on 3 Aug 2020
probably you can use
IMO splitting a matrix in cell is rarely a good idea if you want your code works decenly in speed.
Constantino Carlos Reyes-Aldasoro on 3 Aug 2020
There is not enough information to be certain about your question, but by addressing your matrices you can create submatrices like this:
BigMatrix = ones(16,16,16);
smallMatrix_1 = BigMatrix(1:8,1:8,1:8);
smallMatrix_2 = BigMatrix(1:8,1:8,9:16);
smallMatrix_3 = BigMatrix(1:8,9:16,1:8);
smallMatrix_4 = BigMatrix(9:16,1:8,1:8);