1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <title>Description of quadrupole</title> |
---|
6 | <meta name="keywords" content="quadrupole"> |
---|
7 | <meta name="description" content="QUADRUPOLE('FAMILYNAME',Length [m],K,'METHOD')"> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
9 | <meta name="generator" content="m2html © 2003 Guillaume Flandin"> |
---|
10 | <meta name="robots" content="index, follow"> |
---|
11 | <link type="text/css" rel="stylesheet" href="../../../m2html.css"> |
---|
12 | </head> |
---|
13 | <body> |
---|
14 | <a name="_top"></a> |
---|
15 | <div><a href="../../../index.html">Home</a> > <a href="../../index.html">at</a> > <a href="#">simulator</a> > <a href="index.html">element</a> > quadrupole.m</div> |
---|
16 | |
---|
17 | <!--<table width="100%"><tr><td align="left"><a href="../../../index.html"><img alt="<" border="0" src="../../../left.png"> Master index</a></td> |
---|
18 | <td align="right"><a href="index.html">Index for at/simulator/element <img alt=">" border="0" src="../../../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>quadrupole |
---|
21 | </h1> |
---|
22 | |
---|
23 | <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2> |
---|
24 | <div class="box"><strong>QUADRUPOLE('FAMILYNAME',Length [m],K,'METHOD')</strong></div> |
---|
25 | |
---|
26 | <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2> |
---|
27 | <div class="box"><strong>function z=quadrupole(fname,L,K,method) </strong></div> |
---|
28 | |
---|
29 | <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2> |
---|
30 | <div class="fragment"><pre class="comment">QUADRUPOLE('FAMILYNAME',Length [m],K,'METHOD') |
---|
31 | creates a new family in the FAMLIST - a structure with fields% FamName |
---|
32 | FamName family name |
---|
33 | Length length[m] |
---|
34 | K K-value of the quadrupole |
---|
35 | NumIntSteps Number of integration steps |
---|
36 | MaxOrder |
---|
37 | R1 6 x 6 rotation matrix at the entrance |
---|
38 | R2 6 x 6 rotation matrix at the entrance |
---|
39 | T1 6 x 1 translation at entrance |
---|
40 | T2 6 x 1 translation at exit |
---|
41 | PassMethod name of the function to use for tracking |
---|
42 | returns assigned address in the FAMLIST that is uniquely identifies |
---|
43 | the family</pre></div> |
---|
44 | |
---|
45 | <!-- crossreference --> |
---|
46 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2> |
---|
47 | This function calls: |
---|
48 | <ul style="list-style-image:url(../../../matlabicon.gif)"> |
---|
49 | </ul> |
---|
50 | This function is called by: |
---|
51 | <ul style="list-style-image:url(../../../matlabicon.gif)"> |
---|
52 | </ul> |
---|
53 | <!-- crossreference --> |
---|
54 | |
---|
55 | |
---|
56 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2> |
---|
57 | <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function z=quadrupole(fname,L,K,method)</a> |
---|
58 | 0002 <span class="comment">%QUADRUPOLE('FAMILYNAME',Length [m],K,'METHOD')</span> |
---|
59 | 0003 <span class="comment">% creates a new family in the FAMLIST - a structure with fields% FamName</span> |
---|
60 | 0004 <span class="comment">% FamName family name</span> |
---|
61 | 0005 <span class="comment">% Length length[m]</span> |
---|
62 | 0006 <span class="comment">% K K-value of the quadrupole</span> |
---|
63 | 0007 <span class="comment">% NumIntSteps Number of integration steps</span> |
---|
64 | 0008 <span class="comment">% MaxOrder</span> |
---|
65 | 0009 <span class="comment">% R1 6 x 6 rotation matrix at the entrance</span> |
---|
66 | 0010 <span class="comment">% R2 6 x 6 rotation matrix at the entrance</span> |
---|
67 | 0011 <span class="comment">% T1 6 x 1 translation at entrance</span> |
---|
68 | 0012 <span class="comment">% T2 6 x 1 translation at exit</span> |
---|
69 | 0013 <span class="comment">% PassMethod name of the function to use for tracking</span> |
---|
70 | 0014 <span class="comment">% returns assigned address in the FAMLIST that is uniquely identifies</span> |
---|
71 | 0015 <span class="comment">% the family</span> |
---|
72 | 0016 |
---|
73 | 0017 ElemData.FamName = fname; <span class="comment">% add check for existing identical family names</span> |
---|
74 | 0018 ElemData.Length = L; |
---|
75 | 0019 ElemData.K = K; |
---|
76 | 0020 ElemData.MaxOrder = 3; |
---|
77 | 0021 ElemData.NumIntSteps = 10; |
---|
78 | 0022 ElemData.PolynomA= [0 0 0 0]; |
---|
79 | 0023 ElemData.PolynomB= [0 K 0 0]; |
---|
80 | 0024 ElemData.R1 = diag(ones(6,1)); |
---|
81 | 0025 ElemData.R2 = diag(ones(6,1)); |
---|
82 | 0026 ElemData.T1 = zeros(1,6); |
---|
83 | 0027 ElemData.T2 = zeros(1,6); |
---|
84 | 0028 ElemData.PassMethod=method; |
---|
85 | 0029 |
---|
86 | 0030 <span class="keyword">global</span> FAMLIST |
---|
87 | 0031 z = length(FAMLIST)+1; <span class="comment">% number of declare families including this one</span> |
---|
88 | 0032 FAMLIST{z}.FamName = fname; |
---|
89 | 0033 FAMLIST{z}.NumKids = 0; |
---|
90 | 0034 FAMLIST{z}.KidsList= []; |
---|
91 | 0035 FAMLIST{z}.ElemData= ElemData; |
---|
92 | 0036</pre></div> |
---|
93 | <hr><address>Generated on Mon 21-May-2007 15:26:45 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
94 | </body> |
---|
95 | </html> |
---|