how to concatenate all the cell values horizondally in matlab

1 Ansicht (letzte 30 Tage)
navan
navan am 3 Apr. 2016
Kommentiert: navan am 3 Apr. 2016
I have a cell array
{[1;1;1] [2;2] [3;3;3;3] }
I want to convert the cell array into a single vector
[1,1,1,2,2,3,3,3,3]
Kindly help.

Akzeptierte Antwort

per isakson
per isakson am 3 Apr. 2016
Bearbeitet: per isakson am 3 Apr. 2016
One way
>> cac = {[1;1;1] [2;2] [3;3;3;3] };
>> cat( 1, cac{:} )'
ans =
1 1 1 2 2 3 3 3 3

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by