According to the help for this function:
Gamma(a) has density function p(x) = x^(a-1)*exp(-x)/gamma(a).

Now it seems that, according tohttp://en.wikipedia.org/wiki/Gamma_distribution
a Gamma distribution can be defined in terms of two parameters a and theta, such that
Gamma(a,theta) has density function
p(a,theta) = x^(a-1)*exp(-x/theta) / (gamma(a)*theta^a);

I am trying to draw from a chi-square distribution using randgamma. Specifically, my understanding is that if I let
y = x/2;
and
a = k/2;
I should be able to draw from the corresponding randgamma(a) distribution; in other words:
chi-values = 2*randgamma(k/2);