Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

generates random variates from over 870 univariate distributions

genbinom_cdf(n,p,r,s)
% genbinom_cdf.m - compute a Generalized Binomial Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp & Kotz,
%   J. Wiley, p.102, 2005. 
%
%  Created by Jim Huntley,  01/30/07
%

function [cdf] = genbinom_cdf(n,p,r,s)

sum1 = genbinom_pdf(0,p,r,s);
for jn = 1:n
    sum1 = sum1 + genbinom_pdf(jn,p,r,s);
end
cdf = sum1;

return



Contact us