Home > atplot > plotfunctions > plenvelope.m

plenvelope

PURPOSE ^

PLENVELOPE Plot beam envelope

SYNOPSIS ^

function varargout=plenvelope(varargin)

DESCRIPTION ^

PLENVELOPE    Plot beam envelope

Helper function for atplot: plot
- H and V beam envelopes on left axis

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function varargout=plenvelope(varargin)
0002 %PLENVELOPE    Plot beam envelope
0003 %
0004 %Helper function for atplot: plot
0005 %- H and V beam envelopes on left axis
0006 
0007 if nargout == 1
0008     refpts=1:length(varargin{2})+1;
0009     lind=atx(varargin{2:3},refpts);
0010     sigma=cat(3,lind.beam66);
0011     plotdata(1).values=1.0e6*sqrt([squeeze(sigma(1,1,:)) squeeze(sigma(3,3,:))]);
0012     plotdata(1).labels={'horizontal','vertical'};
0013     plotdata(1).axislabel='beam envelope [\mum]';
0014     varargout={plotdata};
0015 else
0016     s=findspos(varargin{1},1:length(varargin{1})+1);
0017     varargout={s,plenvelope([],varargin{1:2})};
0018 end
0019 end

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