Last change
on this file since 5 was
4,
checked in by zhangj, 11 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
651 bytes
|
Line | |
---|
1 | function varargout = plotcod(RING,DP) |
---|
2 | %PLOTCOD Closed Orbit Distortion |
---|
3 | % PLOTCOD(RING,DP) finds and plots closed orbit for a given momentum |
---|
4 | % deviation DP. It calls FINDORBIT4 which assumes a lattice |
---|
5 | % with NO accelerating cavities and NO radiation |
---|
6 | |
---|
7 | localspos = findspos(RING,1:length(RING)+1); |
---|
8 | orbit = findorbit4(RING,DP,1:length(RING)+1); |
---|
9 | |
---|
10 | |
---|
11 | plot(localspos,orbit(1,:),'.-r'); |
---|
12 | title('Closed Orbit Distortion') |
---|
13 | hold on |
---|
14 | plot(localspos,orbit(3,:),'.-b'); |
---|
15 | hold off |
---|
16 | |
---|
17 | A = axis; |
---|
18 | A(1) = 0; |
---|
19 | A(2) = localspos(end); |
---|
20 | axis(A); |
---|
21 | |
---|
22 | legend('Horizontal','Vertical'); |
---|
23 | xlabel('s - position [m]'); |
---|
24 | ylabel('orbit [m]'); |
---|
25 | |
---|
26 | grid on |
---|
27 | |
---|
28 | if nargout > 0 |
---|
29 | varargout{1} = orbit; |
---|
30 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.