Home > lattice > element_creation > atM66.m

atM66

PURPOSE ^

ATM66(FAMNAME,M66,PASSMETHOD)

SYNOPSIS ^

function elem=atM66(fname,varargin)

DESCRIPTION ^

ATM66(FAMNAME,M66,PASSMETHOD)
   atM66 creates an element that applies an arbitrary matrix m66

FAMNAME    family name
M66        transfer matrix, defaults to Identity(6)]
PASSMETHOD    tracking function, defaults to 'Matrix66Pass'

ATM66(FAMNAME,ATSTRUCT,PASSMETHOD)
   atM66 will generate the matrix by calling FINDM66(ATSTRUCT)

ATSTRUCT   AT structure

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function elem=atM66(fname,varargin)
0002 %ATM66(FAMNAME,M66,PASSMETHOD)
0003 %   atM66 creates an element that applies an arbitrary matrix m66
0004 %
0005 %FAMNAME    family name
0006 %M66        transfer matrix, defaults to Identity(6)]
0007 %PASSMETHOD    tracking function, defaults to 'Matrix66Pass'
0008 %
0009 %ATM66(FAMNAME,ATSTRUCT,PASSMETHOD)
0010 %   atM66 will generate the matrix by calling FINDM66(ATSTRUCT)
0011 %
0012 %ATSTRUCT   AT structure
0013 
0014 [rsrc,m66,method] = decodeatargs({eye(6),'Matrix66Pass'},varargin);
0015 [method,rsrc]     = getoption(rsrc,'PassMethod',method);
0016 [cl,rsrc]         = getoption(rsrc,'Class','Matrix66');
0017 
0018 if isstruct(m66)
0019     m66=findm66(m66);
0020 end
0021 
0022 elem=atbaselem(fname,method,'Class',cl,'M66',m66,rsrc{:});
0023 
0024 end

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