0001 function varargout=plClosedOrbit(varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 if nargout == 1
0013 lindata=varargin{1};
0014 CoD=cat(2,lindata.ClosedOrbit)';
0015 [xref,zref]=atreforbit(varargin{2});
0016 xref(5)
0017 plotdata(1).values=CoD(:,[1 3])+[xref zref];
0018 plotdata(1).labels={'x_{co}','z_{co}'};
0019 plotdata(1).axislabel='x,z [m]';
0020 dispersion=cat(2,lindata.Dispersion)';
0021 plotdata(2).values=dispersion(:,3);
0022 plotdata(2).labels={'\eta_y'};
0023 plotdata(2).axislabel='vertical dispersion [m]';
0024 varargout={plotdata};
0025 else
0026 refpts=1:length(varargin{1})+1;
0027 [lindata,tune,chrom]=atlinopt(varargin{1:2},refpts);
0028 varargout={cat(1,lindata.SPos),plClosedOrbit(lindata,varargin{:})};
0029 end
0030 end