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

rgentopleon_pdf(x, alpha, bet, a, b)
% rgentopleon_pdf.m - evaluates a Reflected Generalized Topp and Leone Probability Density.
%   DRM, "RGTCDF", Vol 1 Aux, NIST, 3/5/2008. 
%   Created by Jim Huntley,  11/19/09

function [pdf] = rgentopleon_pdf(x, alpha, bet, a, b)

%persistent coef

    coef = bet / (b-a);

argx = (b-x) ./ (b-a);
pdf = coef .* argx.^(bet-1) .* (alpha-(alpha-1).*argx).^(bet-1) .* (alpha-2.*(alpha-1).*argx);


Contact us