MATLAB: Group every ten cell array

concatenate cellsevery 10group cell arraymat2cell

Hi all i have a cell array 1×180 and i want to group by every 10 cells
conc.PNG
For example i want the elements from 1 cell till 10 get grouped,11:21, 22:32 etc..
So the new cell should be 1×18
How can i do this?

Best Answer

c = cell(1,180); % the original 1x180 cell array
newCell = mat2cell(c,1,repmat(10,1,18)); %the new nested cell array