MATLAB: How to concatenate the cell data into a single matrix

cell arraysconcatenation

All the data samples are of same length. i need to create a matrix containing all this data. there are 327 cells like this in continuation.

Best Answer

Single_Matrix = cell2mat(cellfun(@(C) C(:), YourCell, 'uniform', 0));
However, I am concerned about whether this will work. You said twice that you have 327 cells, but your header shows that you have a 1 x 328 cell array. Is one of the cells empty and that is why you say 327 ? If so then what do you want done about the empty cell?