Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

lerch_pdf(n, z, s, ups)
% lerch_pdf.m - evaluatess a Lerch Probability Density.
%   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 [pdf] = lerch_pdf(n, z, s, ups)

persistent c

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

pdf = c * z^n / (ups+n)^s;


Contact us