function x = gamma_rnd(m,c,R,C)
% x = gamma_rnd(m,c,R,C)
% return a R by C matrix gamma distributed random variables,
% with mean m and coefficient of variation, c

  k     = 1/c^2;        % shape parameter
  theta = c^2*m;        % scale parameter

  x  =  theta .* randg(k,R,C);

% gamma_rnd ---------------------------------------------------- 3 March 2015

