0001 function hh=vertlines( xpts, opts );
0002 
0003 
0004 
0005 
0006 
0007 
0008   if nargin==1; opts = {}; end
0009   if ischar(xpts) && strcmp(xpts,'UNIT_TEST'); do_unit_test; return; end
0010 
0011   xpts = reshape(xpts,1,[]);
0012   oo   = 1+0*xpts;
0013   yl=ylim;
0014   
0015   hh=line([1;1]*xpts,yl'*oo,-[1;1]*oo,'Color',[0,0,0], ...
0016       'HandleVisibility','off',opts{:});
0017   ylim(yl);
0018 
0019 
0020 function do_unit_test
0021   t=linspace(0,100,1000);
0022   plot(t,sin(t).*exp(-t/100));
0023   vertlines([0:20:60]);
0024   vertlines([50],{'LineWidth',3,'Color',[0,1,0]});