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

gennegbin_cdf(n, alphat, bet, m)
% gennegbin_cdf.m - compute a Generalized Negative Binomial Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp & Kotz,
%   J. Wiley, p.256, 2005. 
%  Created by Jim Huntley,  02/12/07

function [cdf] = gennegbin_cdf(n, alphat, bet, m)

sum1 = gennegbin_pdf(0, alphat, bet, m);
for jn = 1:n
    sum1 = sum1 + gennegbin_pdf(jn, alphat, bet, m);
cdf = sum1;


Contact us