How to convert cell into mat by single command?

1 view (last 30 days)
[1x9 double] [1x8 double] [1x7 double]
Columns 4 through 6
[1x6 double] [1x5 double] [1x4 double]
Columns 7 through 9
[1x3 double] [1x2 double] [1x0x0 double]
I have to use these values in loop.
i want it as out(:,:,:) format.

Answers (1)

Guillaume
Guillaume on 5 Feb 2016
Since all the vectors in your cell array have all different numbers of columns but just one row, the only matrix you can put them all together is a row vector, which you'd achieve with
rowvector = [yourcellarray{:}]
There is no way to concatenate the vectors in a 3d matrix unless you first add or remove elements in these vectors so they're all the same size.

Categories

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

Products

Community Treasure Hunt

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

Start Hunting!