Effacer les filtres
Effacer les filtres

How do I recombine matrices in this order?

1 vue (au cours des 30 derniers jours)
matlabkid602
matlabkid602 le 21 Juil 2017
Commenté : matlabkid602 le 21 Juil 2017
I have nine matrices with equal dimensions of 40x10, how do I recombine them in the way shown in my png?
Thank you

Réponse acceptée

Guillaume
Guillaume le 21 Juil 2017
If your matrices are not together in a cell array, e.g. they're individually numbered matrices, then
  • don't do that!
  • fix the problem by putting them together in a cell array:
c = {M1, M2, M3, ....}
it is then trivial to reshape/transform that cell array and generate the full matrix you want:
c = reshape(c, 3, 3); %reshape the cell array in a 3x3 grid
c = rot90(c); %rotate 90 degrees anticlockwise
result = cell2mat(c); %concatenate all into one matrix
  1 commentaire
matlabkid602
matlabkid602 le 21 Juil 2017
Thank you so much, you have saved me a lot of time :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays 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