Effacer les filtres
Effacer les filtres

How to combine array or matrix???

4 vues (au cours des 30 derniers jours)
reez all
reez all le 12 Mar 2012
i have problem on combine a few matrix into one. For example matrix with (1,3),(1,4),(1,1) and (1,2) into (1,n). The number of matrix is generated randomly and the size of matrix also is randomly. If i used zeros matrix and save all the matrix into it, how am i suppose to know the total size of zeros matrix that i have to create? is there any other way to solve this proble?? thank you..

Réponse acceptée

Jan
Jan le 12 Mar 2012
How do you store the set of matrices? If they are stored in a cell:
C = {rand(1, 3), rand(1,4), rand(1,1), rand(1,2)};
D = cat(2, C{:});
  1 commentaire
reez all
reez all le 13 Mar 2012
thank you, it's work..

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