function out = uniform(n)
% generates discrete uniform distribution over {1, 2, ..., n}
out = ceil(n*rand());