RESTOREPARAMGROUP restores the values of multiple physical parameters of the lattice. NEWLATTICE = RESTOREPARAMGROUP(LATTICE,PARAMGROUP) See also: ATPARAMGROUP RESTORPARAMGROUP SAVEPARAMGROUP
0001 function NEWLATTICE = restoreparamgroup(LATTICE,PARAMGROUP) 0002 %RESTOREPARAMGROUP restores the values of multiple physical 0003 % parameters of the lattice. 0004 % NEWLATTICE = RESTOREPARAMGROUP(LATTICE,PARAMGROUP) 0005 % 0006 % See also: ATPARAMGROUP RESTORPARAMGROUP SAVEPARAMGROUP 0007 NEWLATTICE=LATTICE; 0008 0009 for i=1:length(PARAMGROUP) 0010 NEWLATTICE{PARAMGROUP(i).ElemIndex}=... 0011 setfield(NEWLATTICE{PARAMGROUP(i).ElemIndex},... 0012 PARAMGROUP(i).FieldName,PARAMGROUP(i).FieldIndex,... 0013 PARAMGROUP(i).SavedValue); 0014 end