MATLAB: How to extract the data from cell to normal matrix

cellextract data

Hi everybody,
I am looking for an answer to my problem. I have 1×600 cell data which every cell contain 1888×4 matrix. The first column is x, the second is y, the 3rd is u and the 4th is z. I would like to collect all of x column into 1 matrix. In the end, I will have x_collection = 1888×600 matrix.
Does anyone know how to do it? I am a newbie here. Really appreciate your help

Best Answer

all_x = cell2mat( cellfun(@(C) C(:,1), YourCell, 'uniform', 0));