Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

mandel_pdf(n, NN, q, s)
% mandel_pdf.m - evaluates a Zipf-Mandelbrot Probability Density.
%   See "http/en.wikipedia.org/wiki/ZipfMandelbrot_law", web.
%
%  Created by Jim Huntley,  07/15/05
%
%

function [pdf] = mandel_pdf(n, NN, q, s)

sum1 = 0;
for jNN = 1:NN
    sum1 = sum1 + 1 / (jNN + q)^s;
end
HNN = sum1;
pdf = 1 / ((n+q)^s * HNN);

return

Contact us