SAVEPARAMGROUP saves the values of multiple physical parameters of the lattice in the special SavedValue field of AT parameter group structure. The result can be late used with RESTOREPARAMGROUP PARAMGROUP = saveparamgroup(LATTICE,PARAMGROUP) See also: ATPARAMGROUP RESTORPARAMGROUP SETPARAMGROUP
0001 function NEWPARAMGROUP = saveparamgroup(LATTICE,PARAMGROUP) 0002 %SAVEPARAMGROUP saves the values of multiple physical 0003 % parameters of the lattice in the special SavedValue field of 0004 % AT parameter group structure. The result can be late used 0005 % with RESTOREPARAMGROUP 0006 % 0007 % PARAMGROUP = saveparamgroup(LATTICE,PARAMGROUP) 0008 % 0009 % See also: ATPARAMGROUP RESTORPARAMGROUP SETPARAMGROUP 0010 0011 NEWPARAMGROUP=PARAMGROUP; 0012 0013 for i=1:length(PARAMGROUP) 0014 NEWPARAMGROUP(i).SavedValue = ... 0015 getfield(LATTICE{PARAMGROUP(i).ElemIndex},... 0016 PARAMGROUP(i).FieldName,PARAMGROUP(i).FieldIndex); 0017 end