Generation of Random Variates
09 Feb 2012
generates random variates from over 870 univariate distributions
% composition_cdf.m - compute Anderson Composition Cumulative Distribution Function.
% See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
% J. Wiley, p.238, 2005.
% Created by: Jim Huntley, 12/05/06.
function [cdf] = composition_cdf(n,N,K)
sum1 = composition_pdf(0,N,K);
for jn = 1:n
sum1 = sum1 + composition_pdf(jn,N,K);
cdf = sum1;