function tanxInvxPlot(a,xmin,xmax,n)
% tanxInvxPlot  Plot y = tan(a*x) - 1/x

if nargin<1, a = 1.0;       end
if nargin<2, xmin = -2*pi;  end
if nargin<3, xmax =  2*pi;  end
if nargin<4, n = 500;       end

  % -- Begin nested function
  function y = tanfun(x)
    y = tan(a*x) - 1./x;
  end

x = linspace(xmin,xmax,n);
y = tanfun(x);
plot(x,y)

end