MATLAB: Vertically Concatenate Cells with Same Number of Columns

cell arrays

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?

Best Answer

I’m not sure what you want. Does this work for you?
data_final = { {rand(1,5)}; {rand(2,5)}; {rand(3,5)} };
data_cat = cellfun(@vertcat, data_final);