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

uniprod_pdf(x, n)
% uniprod_pdf.m - evaluates a Uniform Product Probability Density.
%   See "Uniform Product Distribution", http://mathworld.wolfram.com.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  11/03/05
%

function [pdf] = uniprod_pdf(x, n)

%facnm1 = factorial(n-1);
monm1 = (-1)^(n-1);
%pdf(jx) = monm1 .* (log(x)).^(n-1) ./ facnm1;
pdf = monm1 .* real(exp((n-1).*log(log(x)+eps) - gammaln(n)));

return

Contact us