Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

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

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

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

return

Contact us