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

dispar_pdf(n, rho)
% dispar_pdf.m - evaluates a Discrete Pareto (Zipf) Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.527, 2005. 
%
%  Created by Jim Huntley,  12/14/06
%

function [pdf] = dispar_pdf(n, rho)

%persistent coef

%if(isempty(coef))
    coef = 1 / zeta(rho+1);
%end

pdf = coef * n^(-(rho+1));

return


Contact us