function x = randexpn(lambda,n)
%randexpn(lambda,n) produces a 1xn array of exponentially distributed 
%pseudo-random variables, with parameter lambda.
%
if nargin==1
	n=1;
end;
x=-log(1-rand([1,n]))/lambda;
end
% M. Day, August 7, 2014

