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

dbpar_pdf(x, alpha, bet)
% dbpar_pdf.m - tests a Double Pareto Probaility Density.
%   See "The Double Pareto-Lognormal Distribution - 
%   A New Parametric Model for Size Distributions", W.J Reed & M. Jorgensen,
%   http://citeseer.ist.psu.edu/691544.html
%
%   Created by: J. Huntley, 02/20/08
%

function [pdf] = dbpar_pdf(x, alpha, bet)

%persistent coef

%if(isempty(coef))
    coef = alpha*bet / (alpha+bet);
%end

for jx = 1:size(x,2)
    if(x(jx) > 0 && x(jx) <= 1)
        pdf(jx) = coef * x(jx)^(bet-1);
    elseif(x(jx) > 1)
        pdf(jx) = coef * x(jx)^(-alpha-1);
    end
end

return

Contact us