How to split a 3d matrix into sub-3d matrices?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
farhad vaseghi
el 3 de Ag. de 2020
Comentada: Constantino Carlos Reyes-Aldasoro
el 3 de Ag. de 2020
How can I split e.g. a a1xb1xc matrix into non-overlapping (neighbouring) smaller matrices a2xb2xc?
Respuestas (2)
Bruno Luong
el 3 de Ag. de 2020
probably you can use
mat2cell
IMO splitting a matrix in cell is rarely a good idea if you want your code works decenly in speed.
0 comentarios
Constantino Carlos Reyes-Aldasoro
el 3 de Ag. de 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);
etc.
6 comentarios
Ver también
Categorías
Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!