about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/KPMstats/unif_discrete_sample.m
blob: aad19e055310bc727778b41afd11f793879fdb77 (plain)
1
2
3
4
5
6
function r = unif_discrete_sample(n, nrows, ncols)
% UNIF_DISCRETE_SAMPLE Generate random numbers uniformly from {1,2,..,n}
% function r = unif_discrete_sample(n, nrows, ncols)
% Same as unidrnd in the stats toolbox.

r = ceil(n .* rand(nrows,ncols));