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

topleon_pdf(x, bet, a, b)
% topleon_pdf.m - evaluates a Topp and Leone Probability Density.
%   See "Dataplot Reference Manual", vol.1, Aux.
%   http://www.nist.gov/div898/software/dataplot/refman2/auxillar/toppdf.htm.
%
%  Created by Jim Huntley,  01/09/10
%

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

%persistent coef

%if(isempty(coef))
    coef = 2 * bet / (b-a);
%end

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

return

Contact us