Home > lattice > Converters > MADX2AT > reshapeToCellArray.m

reshapeToCellArray

PURPOSE ^

if CEL_CEL is a cell array of structures and cell arrays it converts it a

SYNOPSIS ^

function CEL_AR=reshapeToCellArray(CEL_CEL)

DESCRIPTION ^

 if CEL_CEL is a cell array of structures and cell arrays it converts it a
 cell array of structures.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005