Save matrices (present within a cell) into a single matrix
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Alberto Acri
le 5 Jan 2023
Commenté : Stephen23
le 10 Jan 2023
Hi. I would like to save matrices (present within a cell) into one single matrix. How can I do this?
Here is an example of a cell:
C = {rand(1225,3), rand(844,3), rand(1004,3), rand(252,3), rand(779,3)};
I would like to get the result below ("matrix") but without manually creating all the matrices (C1, C2, C3, C4, C5) present inside the cell.
C = {rand(1225,3), rand(844,3), rand(1004,3), rand(252,3), rand(779,3)};
C1 = C{1,1};
C2 = C{1,2};
C3 = C{1,3};
C4 = C{1,4};
C5 = C{1,5};
matrix = [C1; C2; C3; C4; C5];
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Resizing and Reshaping 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!