MATLAB: Copy different cell values to a single cell cell arrays i have 3 cell of size (c1 = 1 X 5; c2 = 1 X 10; c3 = 1 X 15); i wanted to copy all the cell values to a single cell of size (c = 1 X 40) please tell me how to do it Best Answer Simple:c = {zeros(1, 5); ones(1, 10); zeros(1, 15)}; %for examplenewc = [c{:}]This uses the expansion of cell arrays into a comma separated list Related SolutionsMATLAB: Copying cells in cell arrays A = repmat(num2cell(rand(11,1)),1,11) MATLAB: Combine a cell array of cell arrays to a single cell array NewCellArray = vertcat( ExistingCellArray{:} ); Related QuestionCopy cells a variable number of timesHow to merge cell (100 x 3) of arrays into a single cell (100 x 1) by concatenating the arraysReplicating/copy part of Cell Array
Best Answer