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

haighthar_cdf(n,Z2)
% haighthar_cdf.m - compute Haight's Harmonic Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.534 2005.                  
%
%  Created by:  Jim Huntley,  03/12/07.
%

function [cdf] = haighthar_cdf(n,Z2)

sum1 = 0;
for jn = 1:n
    sum1 = sum1 + haighthar_pdf(jn,Z2);
end
cdf = sum1;

return



Contact us