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 demoknob</title> |
---|
6 | <meta name="keywords" content="demoknob"> |
---|
7 | <meta name="description" content="DEMOKNOB illustrates the use of MATLAB GUI controls with AT"> |
---|
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="index.html">atdemos</a> > demoknob.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/atdemos <img alt=">" border="0" src="../../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>demoknob |
---|
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>DEMOKNOB illustrates the use of MATLAB GUI controls with AT</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>This is a script file. </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">DEMOKNOB illustrates the use of MATLAB GUI controls with AT |
---|
31 | to modify several parameters in THERING |
---|
32 | In this case - quadrupole strength of QF and QD families |
---|
33 | This demo creates spear2 lattice |
---|
34 | and 2 control slider: for QF and for QD quadrupole families</pre></div> |
---|
35 | |
---|
36 | <!-- crossreference --> |
---|
37 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> |
---|
38 | This function calls: |
---|
39 | <ul style="list-style-image:url(../../matlabicon.gif)"> |
---|
40 | <li><a href="atslider.html" class="code" title="function fig = atslider(varargin)">atslider</a> ATSLIDER is an example of a GUI control of multiple parameters in THERING</li><li><a href="spear2.html" class="code" title="function spear2">spear2</a> SPEAR2 example lattice definition file</li></ul> |
---|
41 | This function is called by: |
---|
42 | <ul style="list-style-image:url(../../matlabicon.gif)"> |
---|
43 | <li><a href="talk.html" class="code" title="">talk</a> TALK</li></ul> |
---|
44 | <!-- crossreference --> |
---|
45 | |
---|
46 | |
---|
47 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> |
---|
48 | <div class="fragment"><pre>0001 <span class="comment">%DEMOKNOB illustrates the use of MATLAB GUI controls with AT</span> |
---|
49 | 0002 <span class="comment">% to modify several parameters in THERING</span> |
---|
50 | 0003 <span class="comment">% In this case - quadrupole strength of QF and QD families</span> |
---|
51 | 0004 <span class="comment">% This demo creates spear2 lattice</span> |
---|
52 | 0005 <span class="comment">% and 2 control slider: for QF and for QD quadrupole families</span> |
---|
53 | 0006 |
---|
54 | 0007 clear all |
---|
55 | 0008 close all |
---|
56 | 0009 <a href="spear2.html" class="code" title="function spear2">spear2</a> |
---|
57 | 0010 qflist = findcells(THERING,<span class="string">'FamName'</span>,<span class="string">'QF'</span>); |
---|
58 | 0011 qdlist = findcells(THERING,<span class="string">'FamName'</span>,<span class="string">'QD'</span>); |
---|
59 | 0012 QFW = 0.02; |
---|
60 | 0013 QDW = -0.02; |
---|
61 | 0014 |
---|
62 | 0015 weights1 = num2cell(QFW*ones(size(qflist))); |
---|
63 | 0016 kn1 = struct(<span class="string">'Position'</span>,num2cell(qflist),<span class="string">'FieldName'</span>,<span class="string">'K'</span>,<span class="string">'M'</span>,1,<span class="string">'N'</span>,1,<span class="string">'Weight'</span>,weights1); |
---|
64 | 0017 <span class="comment">% When a value is changed, the PLOTBETA callback renews the beta-functions plot</span> |
---|
65 | 0018 <a href="atslider.html" class="code" title="function fig = atslider(varargin)">atslider</a>(kn1,<span class="string">'Demo: Adjust QF'</span>,<span class="string">'plotbeta'</span>); |
---|
66 | 0019 <span class="comment">%atslider(kn1,'Demo: Adjust QF');</span> |
---|
67 | 0020 |
---|
68 | 0021 weights2 = num2cell(QDW*ones(size(qdlist))); |
---|
69 | 0022 kn2 = struct(<span class="string">'Position'</span>,num2cell(qdlist),<span class="string">'FieldName'</span>,<span class="string">'K'</span>,<span class="string">'M'</span>,1,<span class="string">'N'</span>,1,<span class="string">'Weight'</span>,weights2); |
---|
70 | 0023 <a href="atslider.html" class="code" title="function fig = atslider(varargin)">atslider</a>(kn2,<span class="string">'Demo: Adjust QD'</span>,<span class="string">'plotbeta'</span>); |
---|
71 | 0024 <span class="comment">%atslider(kn2,'Demo: Adjust QD');</span></pre></div> |
---|
72 | <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> |
---|
73 | </body> |
---|
74 | </html> |
---|