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

specocc_cdf(n, l, b, c)
% specocc_cdf.m - compute Specified Occupancy Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.441, 2005.                 
%  Created by:  Jim Huntley,  07/16/07.

function [cdf] = specocc_cdf(n, l, b, c)

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


Contact us