Vertically Concatenate Cells with Same Number of Columns
이전 댓글 표시
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?
채택된 답변
추가 답변 (1개)
Azzi Abdelmalek
2015년 7월 14일
편집: Azzi Abdelmalek
2015년 7월 14일
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
Azzi Abdelmalek
2015년 7월 14일
a={num2cell(rand(2,3));num2cell(rand(1,3));num2cell(rand(4,3))}
b=cat(1,a{:})
카테고리
도움말 센터 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!