How to Combine two Cell Array to be 1 cell array?

64 ビュー (過去 30 日間)
ha ha
ha ha 2017 年 12 月 16 日
コメント済み: ha ha 2017 年 12 月 16 日
Let's say:
A : 1x3 cell class
A={cell_1, cell_2, cell_3, }
A={[2x1 double],[5x1 double],[3x1 double]}
B : 1x2 cell class
B={cell_1, cell_2, }
B={[10x1 double],[12x1 double]}
How can i combine A & B to be only one cell C?
C : 1x5 cell class
C={cell_1, cell_2, cell_3, cell_4, cell_5 }
C={[2x1 double],[5x1 double],[3x1 double],[10x1 double],[12x1 double]}
  2 件のコメント
Stephen23
Stephen23 2017 年 12 月 16 日
[A,B]
ha ha
ha ha 2017 年 12 月 16 日
thank @Stephen Cobeldick

サインインしてコメントする。

採用された回答

YT
YT 2017 年 12 月 16 日
編集済み: YT 2017 年 12 月 16 日
It's pretty easy really. Here an example:
A = {rand([2 1]),rand([5 1]),rand([3 1])};
B = {rand([10 1]),rand([12 1])};
C = [A B]; %adds cell B to A

その他の回答 (1 件)

KL
KL 2017 年 12 月 16 日
c = [A B];

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by