function [x,n] = expseq(n0,n1,n2,alpha)
%  Generates x(n) = alpha^(n-n0)*u(n-n0); n1 <= n,n0 <= n2
%  ------------------------------------------
%  [x,n] = expseq(n0,n1,n2,alpha)

if ((n0 < n1) | (n0 > n2) | (n1 > n2))
	error('arguments must satisfy n1 <= n0 <= n2')
end
n = [n1:n2];
%x = [zeros(1,(n0-n1)), ones(1,(n2-n0+1))];
x = [((n-n0) >= 0).*(alpha.^(n-n0))];
