Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

ghgb3_cdf(n, a, b, c)
% ghgb3_cdf.m - compute Generalized Hypergeometric GHgB3 Cumulative Distribution Function.
%   See "Random Variate Generation for the Digamma and Trigamma Distributions", 
%   L. Devroye, McGill, 1991.
%  Created by:  Jim Huntley,  07/15/05.

function [cdf] = ghgb3_cdf(n, a, b, c)

sum1 = ghgb3_pdf(0, a, b, c);
for jn = 1:n
    sum1 = sum1 + ghgb3_pdf(jn, a, b, c);
cdf = sum1;

Contact us