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

38 ビュー (過去 30 日間)
Elakkiya Prakasam
Elakkiya Prakasam 2017 年 7 月 13 日
回答済み: Ariel Cabello 2019 年 5 月 22 日
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?

採用された回答

Walter Roberson
Walter Roberson 2017 年 7 月 13 日
NewCellArray = vertcat( ExistingCellArray{:} );

その他の回答 (1 件)

Ariel Cabello
Ariel Cabello 2019 年 5 月 22 日
Another way:
NewCellArray = [ OldCellArray{:} ];
Regards

カテゴリ

Help Center および File ExchangeNumeric Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by