Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

gentopleo_pdf(x, alpha, bet, a, b)
% gentopleo.m - tests a Generalized Topp & Leone Probability Density.
%   See "Dataplot Reference Manual", GTLPDF, NIST, Vol. 1, Aux.  
%  Created by Jim Huntley,  11/03/08

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

%persistent coef

    coef = bet / (b-a);

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


Contact us