How to Unnest cell array with nested cells to a cell array?

16 views (last 30 days)
How do I expand out an array with dimension '<82794x1 cell>' in which each cell has different dimension like;
[1x12] double
[1x18] double
[1x6] double
[1x14] double
[1x6] double
[1x10] double
[1x6] double
[1x8] double.....and so
Jan on 28 Feb 2017
The shown data looks like they are a cell already and not a "nested cells". Please post the type and the dimensions of the wanted output. e.g. "{1 x N} cell containing [1 x M] vectors".

Sign in to comment.

Answers (1)

KSSV on 28 Feb 2017
Let A be your cell array. Try cell2mat(A)
A{1} = rand(1,10) ;
A{2} = rand(1,11) ;
A{3} = rand(1,7) ;
iwant = cell2mat(A)'

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!