Vertically Concatenate Cells with Same Number of Columns
Ältere Kommentare anzeigen
I have a column of cells (column_data.png) with different number of rows but same number of columns. The cells contain numbers only. How can I vertically concatenate the cells in column_data?
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 14 Jul. 2015
Bearbeitet: Azzi Abdelmalek
am 14 Jul. 2015
cell2mat(YourCellArray)
Or Maybe your data looks like
a={num2cell(rand(2,3));num2cell(rand(1,3));num2cell(rand(4,3))};
out=cell2mat(cellfun(@(x) cell2mat(x),a,'un',0))
2 Kommentare
Azzi Abdelmalek
am 14 Jul. 2015
a={num2cell(rand(2,3));num2cell(rand(1,3));num2cell(rand(4,3))}
b=cat(1,a{:})
Kategorien
Mehr zu Cell Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!