How do i combine multiple cells into one

11 vues (au cours des 30 derniers jours)
fadams18
fadams18 le 13 Juil 2021
I have 3 cells each containting three 20x60 matrices
cell_1 = { 20x60, 20x60 , 20x60 }
...
cell_3= { 20x60, 20x60 , 20x60 }
I would like to stack them on top of each other
cell_1
cell_2
cell_3
so that i obtain final_cell =3 x 3 cell

Réponses (2)

Chunru
Chunru le 13 Juil 2021
c1 = {rand(2), rand(2)}
c1 = 1×2 cell array
{2×2 double} {2×2 double}
c2 = {rand(2), rand(2)}
c2 = 1×2 cell array
{2×2 double} {2×2 double}
c3 = {rand(2), rand(2)}
c3 = 1×2 cell array
{2×2 double} {2×2 double}
c =[c1; c2; c3]
c = 3×2 cell array
{2×2 double} {2×2 double} {2×2 double} {2×2 double} {2×2 double} {2×2 double}

fadams18
fadams18 le 13 Juil 2021
ok never mind figured it out
final_cell=[cel_1; cell_2; cell_3]

Catégories

En savoir plus sur Multidimensional 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