MATLAB: Hi i have 1×36 cell,each cell contains 2×2 cell, how to convert it into 4×36 double in matlab

cell array

plz help me

Best Answer

cell2mat(cellfun(@(c) reshape(cell2mat(c),[], 1), yourcellarray, 'UniformOutput', false))
Although if it's a continuation of the previous question, then change the code to:
cell2mat(cellfun(@(m) reshape(cellfun(@(quadrant) max(quadrant(:)), ... max of a quadrant
mat2cell(m, ... convert matrix in cell into cell of 4 quadrant
[ceil(size(m, 1)/2), floor(size(m, 1)/2)], ...
[ceil(size(m, 2)/2), floor(size(m, 2)/2)])), ...
[], 1), ... reshape maxs of quadrant into column vector
yourcellarray, 'UniformOutput', false)) %process each cell