Home > atplot > plotfunctions > plClosedOrbit.m

plClosedOrbit

PURPOSE ^

PLCLOSEDORBIT Plot H and V closed orbits

SYNOPSIS ^

function varargout=plClosedOrbit(varargin)

DESCRIPTION ^

PLCLOSEDORBIT    Plot H and V closed orbits

Helper function for atplot: plot
- H and V closed orbits on left axis
- Dispersion on right axis

PLOTDATA=PLCLOSEDORBIT(LINDATA,RING,DPP)

[S,PLOTDATA]=PLCLOSEDORBIT(RING,DPP)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function varargout=plClosedOrbit(varargin)
0002 %PLCLOSEDORBIT    Plot H and V closed orbits
0003 %
0004 %Helper function for atplot: plot
0005 %- H and V closed orbits on left axis
0006 %- Dispersion on right axis
0007 %
0008 %PLOTDATA=PLCLOSEDORBIT(LINDATA,RING,DPP)
0009 %
0010 %[S,PLOTDATA]=PLCLOSEDORBIT(RING,DPP)
0011 
0012 if nargout == 1     % From atplot
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                % From atbaseplot
0026     refpts=1:length(varargin{1})+1;
0027     [lindata,tune,chrom]=atlinopt(varargin{1:2},refpts); %#ok<ASGLU>
0028     varargout={cat(1,lindata.SPos),plClosedOrbit(lindata,varargin{:})};
0029 end
0030 end

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005