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 plotnudxT</title> |
---|
6 | <meta name="keywords" content="plotnudxT"> |
---|
7 | <meta name="description" content="function plotnudxT(file)"> |
---|
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="#">machine</a> > <a href="#">Soleil</a> > <a href="../../index.html">common</a> > <a href="#">naff</a> > <a href="index.html">naffutils</a> > plotnudxT.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 machine/Soleil/common/naff/naffutils <img alt=">" border="0" src="../../../../../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>plotnudxT |
---|
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>function plotnudxT(file)</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 plotnudxT(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"> function plotnudxT(file) |
---|
31 | plot tuneshift with amplitude from tracy output file</pre></div> |
---|
32 | |
---|
33 | <!-- crossreference --> |
---|
34 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../../../up.png"></a></h2> |
---|
35 | This function calls: |
---|
36 | <ul style="list-style-image:url(../../../../../matlabicon.gif)"> |
---|
37 | </ul> |
---|
38 | This function is called by: |
---|
39 | <ul style="list-style-image:url(../../../../../matlabicon.gif)"> |
---|
40 | <li><a href="naffgui.html" class="code" title="function varargout = naffgui(varargin)">naffgui</a> NAFFGUI M-file for naffgui.fig</li></ul> |
---|
41 | <!-- crossreference --> |
---|
42 | |
---|
43 | |
---|
44 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../../../up.png"></a></h2> |
---|
45 | <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function plotnudxT(file)</a> |
---|
46 | 0002 <span class="comment">% function plotnudxT(file)</span> |
---|
47 | 0003 <span class="comment">% plot tuneshift with amplitude from tracy output file</span> |
---|
48 | 0004 |
---|
49 | 0005 <span class="keyword">if</span> nargin < 2 |
---|
50 | 0006 file1 =<span class="string">'nudx.out'</span> |
---|
51 | 0007 file2 =<span class="string">'nudz.out'</span> |
---|
52 | 0008 <span class="keyword">end</span> |
---|
53 | 0009 |
---|
54 | 0010 <span class="keyword">try</span> |
---|
55 | 0011 [header data1] = hdrload(file1); |
---|
56 | 0012 <span class="keyword">catch</span> |
---|
57 | 0013 error(<span class="string">'Error while opening filename %s'</span>,file1) |
---|
58 | 0014 <span class="keyword">end</span> |
---|
59 | 0015 |
---|
60 | 0016 <span class="keyword">try</span> |
---|
61 | 0017 [header data2] = hdrload(file2); |
---|
62 | 0018 <span class="keyword">catch</span> |
---|
63 | 0019 error(<span class="string">'Error while opening filename '</span>,file2) |
---|
64 | 0020 <span class="keyword">end</span> |
---|
65 | 0021 |
---|
66 | 0022 <span class="comment">%% amplitude</span> |
---|
67 | 0023 x = data1(:,1)*1e3; |
---|
68 | 0024 z = data2(:,2)*1e3; |
---|
69 | 0025 |
---|
70 | 0026 <span class="comment">%% fractional tunes</span> |
---|
71 | 0027 nux1 = data1(:,3); |
---|
72 | 0028 nuz1 = data1(:,4); |
---|
73 | 0029 nux1(nux1==0)=NaN; |
---|
74 | 0030 nuz1(nuz1==0)=NaN; |
---|
75 | 0031 |
---|
76 | 0032 nux2 = data2(:,3); |
---|
77 | 0033 nuz2 = data2(:,4); |
---|
78 | 0034 nux2(nux2==0)=NaN; |
---|
79 | 0035 nuz2(nuz2==0)=NaN; |
---|
80 | 0036 |
---|
81 | 0037 <span class="comment">%% Set default properties</span> |
---|
82 | 0038 set(0,<span class="string">'DefaultAxesXgrid'</span>,<span class="string">'on'</span>); |
---|
83 | 0039 set(0,<span class="string">'DefaultAxesYgrid'</span>,<span class="string">'on'</span>); |
---|
84 | 0040 |
---|
85 | 0041 <span class="comment">%% Plot</span> |
---|
86 | 0042 figure(43) |
---|
87 | 0043 subplot(2,2,1) |
---|
88 | 0044 plot(x,nux1,<span class="string">'.'</span>) |
---|
89 | 0045 xlabel(<span class="string">'x (mm)'</span>) |
---|
90 | 0046 ylabel(<span class="string">'\nu_x'</span>) |
---|
91 | 0047 |
---|
92 | 0048 subplot(2,2,3) |
---|
93 | 0049 plot(x,nuz1,<span class="string">'.'</span>) |
---|
94 | 0050 xlabel(<span class="string">'x (mm)'</span>) |
---|
95 | 0051 ylabel(<span class="string">'\nu_z'</span>) |
---|
96 | 0052 |
---|
97 | 0053 subplot(2,2,2) |
---|
98 | 0054 plot(z,nux2,<span class="string">'.'</span>) |
---|
99 | 0055 xlabel(<span class="string">'z (mm)'</span>) |
---|
100 | 0056 ylabel(<span class="string">'\nu_x'</span>) |
---|
101 | 0057 |
---|
102 | 0058 subplot(2,2,4) |
---|
103 | 0059 plot(z,nuz2,<span class="string">'.'</span>) |
---|
104 | 0060 xlabel(<span class="string">'z (mm)'</span>) |
---|
105 | 0061 ylabel(<span class="string">'\nu_z'</span>) |
---|
106 | 0062 |
---|
107 | 0063 addlabel(0,0,datestr(now))</pre></div> |
---|
108 | <hr><address>Generated on Mon 21-May-2007 15:35:27 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
109 | </body> |
---|
110 | </html> |
---|