How to split a 3d matrix into sub-3d matrices?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ML
el 20 de Sept. de 2016
How can I split e.g. a 100x100x100 matrix into non-overlapping (neighbouring) smaller matrices 10x10x10? or how to use mat2cell for this problem?
0 comentarios
Respuesta aceptada
Stephen23
el 21 de Sept. de 2016
Editada: Stephen23
el 21 de Sept. de 2016
It is easy to split that array using mat2cell, you just need to define a vector that defines how to split each of the dimensions:
A = rand(100,100,100);
D = 10*ones(1,10);
C = mat2cell(A,D,D,D);
and the output:
>> size(C)
ans =
10 10 10
>> size(C{1})
ans =
10 10 10
0 comentarios
Ver también
Categorías
Más información sobre Downloads 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!