source: MML/trunk/at/atphysics/plotcod.m @ 5

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 
1function 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
7localspos = findspos(RING,1:length(RING)+1);
8orbit = findorbit4(RING,DP,1:length(RING)+1);
9
10
11plot(localspos,orbit(1,:),'.-r');
12title('Closed Orbit Distortion')
13hold on
14plot(localspos,orbit(3,:),'.-b');
15hold off
16
17A = axis;
18A(1) = 0;
19A(2) = localspos(end);
20axis(A);
21
22legend('Horizontal','Vertical');
23xlabel('s - position [m]');
24ylabel('orbit [m]');
25
26grid on
27
28if nargout > 0
29        varargout{1} = orbit;
30end
Note: See TracBrowser for help on using the repository browser.