Hi do you know an easy way to concentrate 88 matrices into one matrix

2 vues (au cours des 30 derniers jours)
Abdullah
Abdullah le 9 Sep 2012
Hi do you know an easy way to concentrate 88 matrices into one matrix

Réponses (3)

Walter Roberson
Walter Roberson le 9 Sep 2012
  1 commentaire
Jan
Jan le 9 Sep 2012
A link to the FAQ is valuable always. And if you are there already, read the other topics also.

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 9 Sep 2012
If they are all separate matrices with separate names, maybe the easiest way is:
allMatrices = [m1(:); m2(:); m3(:); etc. m87(:); m88(:)];
  2 commentaires
Jan
Jan le 9 Sep 2012
Or perhaps without "(:)".
Image Analyst
Image Analyst le 9 Sep 2012
Modifié(e) : Image Analyst le 9 Sep 2012
That would work if they were all the same sizes in all dimensions.
Like Walter hints at, I'm wondering how he ended up with 88 differently-named matrices in the first place. I'm sure that could have been avoided and made more orderly.

Connectez-vous pour commenter.


Jan
Jan le 9 Sep 2012
It would be easy, if the matrices are not called m1, m2, ... m88, but if a cell is used: m{1}, m{2}, ... m{88}. Then:
joined = cat(1, m{:}); % Or cat(2, m{:})
This is explained in the important link posted my Walter.

Catégories

En savoir plus sur Data Type Identification dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by