How to concatenate two or more cell arrays into one?

5 次查看(过去 30 天)
I have two cells:
a =
Columns 1 through 6
[13x1 double] [394x1 double] [181536.00] [44x1 double] [14x1 double] [28x1 double]
b =
[] [14x1 double] [] [4x1 double] [] [2x1 double]
I want one cell:
c =
Columns 1 through 6
[13x1 double] [408x1 double] [181536.00] [48x1 double] [14x1 double] [30x1 double]
i.e. c is the concatenation of a and b.
How?

采纳的回答

Star Strider
Star Strider 2015-5-4
Probably the easiest way is to use the heterogeneous version of the cat function.
  4 个评论
Ladden
Ladden 2015-5-5
Thanks, cellfun and cat works like a charm. Should have thought of this.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by