wolffd@0: function M = sampleUniformInts(N, r, c) wolffd@0: wolffd@0: % M is an rxc matrix of integers in 1..N wolffd@0: wolffd@0: prob = normalize(ones(N,1)); wolffd@0: M = sample_discrete(prob, r, c);