0001 function varargout=plenvelope(varargin)
0002
0003
0004
0005
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