How to concatenate two or more cell arrays into one?

2 views (last 30 days)
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?

Accepted Answer

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

Sign in to comment.

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!