BUILDLAT places elements from FAMLIST into cell array THERING in the order given by ineger arry ELIST to be use in Accelerator Toolbox lattice definition files
0001 function buildlat(ELIST) 0002 %BUILDLAT places elements from FAMLIST into cell array THERING 0003 % in the order given by ineger arry ELIST 0004 % to be use in Accelerator Toolbox lattice definition files 0005 0006 global FAMLIST THERING 0007 THERING=cell(size(ELIST(:))); 0008 for i=1:length(THERING) 0009 THERING{i} = FAMLIST{ELIST(i)}.ElemData; 0010 FAMLIST{ELIST(i)}.NumKids=FAMLIST{ELIST(i)}.NumKids+1; 0011 FAMLIST{ELIST(i)}.KidsList = [FAMLIST{ELIST(i)}.KidsList i]; 0012 end