ATMULTIPOLE(FAMNAME,LENGTH,POLYNOMA,POLYNOMB,PASSMETHOD) creates a multipole element FAMNAME family name LENGTH length[m] POLYNOMA skew [dipole quad sext oct]; POLYNOMB normal [dipole quad sext oct]; PASSMETHOD tracking function. Defaults to 'StrMPoleSymplectic4Pass' ATMULTIPOLE(FAMNAME,LENGTH,POLYNOMA,POLYNOMB,PASSMETHOD,'FIELDNAME1',VALUE1,...) Each pair {'FIELDNAME',VALUE} is added to the element See also: ATDRIFT, ATQUADRUPOLE, ATSEXTUPOLE, ATSBEND, ATRBEND ATTHINMULTIPOLE, ATMARKER, ATCORRECTOR
0001 function elem=atmultipole(fname,varargin) 0002 %ATMULTIPOLE(FAMNAME,LENGTH,POLYNOMA,POLYNOMB,PASSMETHOD) 0003 % creates a multipole element 0004 % 0005 % FAMNAME family name 0006 % LENGTH length[m] 0007 % POLYNOMA skew [dipole quad sext oct]; 0008 % POLYNOMB normal [dipole quad sext oct]; 0009 % PASSMETHOD tracking function. Defaults to 'StrMPoleSymplectic4Pass' 0010 % 0011 %ATMULTIPOLE(FAMNAME,LENGTH,POLYNOMA,POLYNOMB,PASSMETHOD,'FIELDNAME1',VALUE1,...) 0012 % Each pair {'FIELDNAME',VALUE} is added to the element 0013 % 0014 %See also: ATDRIFT, ATQUADRUPOLE, ATSEXTUPOLE, ATSBEND, ATRBEND 0015 % ATTHINMULTIPOLE, ATMARKER, ATCORRECTOR 0016 0017 [rsrc,L,PolynomA,PolynomB,method]=decodeatargs({0,0,0,'StrMPoleSymplectic4Pass'},varargin); 0018 [L,rsrc]=getoption(rsrc,'Length',L); 0019 [PolynomA,rsrc]=getoption(rsrc,'PolynomA',PolynomA); 0020 [PolynomB,rsrc]=getoption(rsrc,'PolynomB',PolynomB); 0021 [method,rsrc]=getoption(rsrc,'PassMethod',method); 0022 [cl,rsrc]=getoption(rsrc,'Class','Multipole'); 0023 elem=atbaselem(fname,method,'Class',cl,'Length',L,... 0024 'PolynomA',PolynomA,'PolynomB',PolynomB,rsrc{:}); 0025 end