git-svn-id: http://moon:8086/svn/matlab/trunk@92 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
2016-07-12 12:01:21 +00:00
parent 7b34529b24
commit b8abc7cbb6
+10
View File
@@ -0,0 +1,10 @@
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;