if CEL_CEL is a cell array of structures and cell arrays it converts it a cell array of structures.
0001 function CEL_AR=reshapeToCellArray(CEL_CEL) 0002 % if CEL_CEL is a cell array of structures and cell arrays it converts it a 0003 % cell array of structures. 0004 0005 CEL_AR={}; 0006 0007 for i=1:length(CEL_CEL) 0008 if ~isstruct(CEL_CEL{i}) 0009 CEL_AR=[CEL_AR; reshapeToCellArray(CEL_CEL{i})]; %#ok<AGROW> 0010 else 0011 CEL_AR=[CEL_AR; CEL_CEL{i}]; 0012 end 0013 end 0014 0015