Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

gurland_cdf(n,k,alpha,bet,theta)
% gurland_cdf.m - compute Gurland H2 Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.298 2005.                  
%
%  Created by:  Jim Huntley,  03/08/07.
%

function [cdf] = gurland_cdf(n,k,alpha,bet,theta)

sum1 = gurland_pdf(0,k,alpha,bet,theta);
for jn = 1:n
    sum1 = sum1 + gurland_pdf(jn,k,alpha,bet,theta);
end
cdf = sum1;

return



Contact us