function n = randint( lo, hi, m, n )
%n = randint( lo, hi, m, n )
%   Return an m*n array of random integers in the range lo..hi inclusive.

    if nargin < 3, m = 1; end
    if nargin < 4, n = 1; end
    
    n = floor( rand(m,n) * (hi-lo+1) ) + lo;
end