function cc = rmatrix(n,m,a,b)
% rmatrix(n,m,a,b) -- generate an n-by-m matrix consisting of
%                     random entries uniformly distributed on [a,b]
%
% NOTE: rand(n,m) returns a matrix with random elements uniformly
% distributed on the interval (0, 1).

if(nargin <= 1)
    m = n;
end

if(nargin <= 2)
    a = 0.0;
    b = 1.0;
end

cc = a * ones(n,m) + (b - a) * rand(n,m);
