wolffd@0: function r = unif_discrete_sample(n, nrows, ncols) wolffd@0: % UNIF_DISCRETE_SAMPLE Generate random numbers uniformly from {1,2,..,n} wolffd@0: % function r = unif_discrete_sample(n, nrows, ncols) wolffd@0: % Same as unidrnd in the stats toolbox. wolffd@0: wolffd@0: r = ceil(n .* rand(nrows,ncols));