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

lerch_cdf(n, z, s, ups)
% lerch_cdf.m - evaluatess a Lerch Cumulative Distribution.
%   See "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] = lerch_cdf(n, z, s, ups)

persistent c

    c = 1 / lerch(z, s, ups);

cdf = 1 - c * z^(n+1) * lerch(z,s,ups+n+1); 


Contact us