Effacer les filtres
Effacer les filtres

Combine a cell array of cell arrays to a single cell array

120 vues (au cours des 30 derniers jours)
Elakkiya Prakasam
Elakkiya Prakasam le 13 Juil 2017
Hi,
I have a dynamic cell array of cell arrays of strings and I want to combine it into a single cell array of strings.
Example: Columns 1 through 4
{4x1 cell} {9x1 cell} {8x1 cell} {10x1 cell}
I want to concatenate and the result in one cell array as
{31x1 cell}.
How to concatenate into one cell Array?

Réponse acceptée

Walter Roberson
Walter Roberson le 13 Juil 2017
NewCellArray = vertcat( ExistingCellArray{:} );

Plus de réponses (1)

Ariel Cabello
Ariel Cabello le 22 Mai 2019
Another way:
NewCellArray = [ OldCellArray{:} ];
Regards

Catégories

En savoir plus sur Creating and Concatenating 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!

Translated by