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

d1salvia_pdf(n, alpha)
% d1salvia_pdf.m - evaluates a 1-displaced Salvia-Bollinger Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.511, 2005. 
%  Created by Jim Huntley,  11/14/06

function [pdf] = d1salvia_pdf(n, alpha)

prod = alpha;
for jn = 1:n-1
    prod = prod * (jn - alpha);
pdf = exp(log(prod) - gammaln(n+1));


Contact us