Divide a 3D matrix into smaller 3D matrixes

2 vues (au cours des 30 derniers jours)
konstantina vatavali
konstantina vatavali le 14 Août 2020
Hello,
I have a 3D matrix e.g. 100x200x400.
How can I divide it into 100 submatrices which dimensions are 100x200x4?
Thank you!
  1 commentaire
KSSV
KSSV le 14 Août 2020
Read about reshape.

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 14 Août 2020
Modifié(e) : Walter Roberson le 14 Août 2020
YourCell = mat2cell(size(YourArray,1), size(YourArray,2), 4*ones(size(YourArray,3)/4));

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by