Matlab's gammainc normalizes the incomplete gamma function by dividing by gamma(1/beta). See its documentation. The Wikipedia formula you are using assumes the incomplete gamma function is not normalized in this manner and divides by gamma(1/beta) in the formula. Thus, in your code you have effectively divided by gamma(1/beta) twice. That would certainly throw off your computations.
Roger Stafford
Best Answer