Files
matlab/RBM/UFLDL/pca/randi.m
T
jens 7b34529b24 imported RBM
git-svn-id: http://moon:8086/svn/matlab/trunk@91 801c6759-fa7c-4059-a304-17956f83a07c
2016-07-12 11:24:12 +00:00

10 lines
192 B
Matlab

function d = randi(range, numRows, numCol)
if length(range) == 2
s = range(2) - range(1);
off = range(1);
else
s = range;
off = 0;
end
d = fix(s*rand(numRows, numCol)+0.5) + off;