Generation of Random Variates
09 Feb 2012
generates random variates from over 870 univariate distributions
|trunlerch_cdf(n, a, b, z, s, ups)
% trunlerch_cdf.m - evaluatess a Truncated Lerch Cumulative Distribution.
% See "Auxiliary Information for Article
% Some Properties of the Lerch Family of Discrete Distributions",
% S.V. Askenov and M.A. Savageau, preprint submitted to Elsevier Science,
% 1 February, 2008.
% Created by Jim Huntley, 12/16/08
function [cdf] = trunlerch_cdf(n, a, b, z, s, ups)
%persistent c c1
c1 = z^a * lerch(z, s, ups+a);
c = 1 / (c1 - z^(b+1) * lerch(z,s,ups+b+1));
cdf = c * (c1 - z^(n+1) * lerch(z,s,ups+n+1));