Concatenate cell array along one dimension

11 Ansichten (letzte 30 Tage)
Xh Du
Xh Du am 4 Jul. 2017
Beantwortet: KSSV am 4 Jul. 2017
Hi all,
I have a cell array like this:
cellA =
[12x2 double] [12x2 double] [12x2 double]
[12x2 double] [12x2 double] [12x2 double]
What I want is to concatenate cellA along dimension 2, so I get a new cell like this:
cellB =
[12x6 double]
[12x6 double]
Any ideas how to obtain cellB? Thanks!

Akzeptierte Antwort

KSSV
KSSV am 4 Jul. 2017
cellB = mat2cell(cell2mat(cellA),[12 12]);

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by