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

genbeta4p_pdf(x, a, b, c, d)
% genbeta4p_pdf.m - evaluates a Generalized Beta 4-Parameter Probability Density.
%   See "Handbook of Beta Distribution and Its Applications", A.K Gupta &,
%   S. Nadarajah, p.116, 2004.  
%
%  Created by Jim Huntley,  09/30/11
%

function [pdf] = genbeta4p_pdf(x, a, b, c, d)

%persistent coef dmc

%if(isempty(coef))
    dmc = d - c;
    coef = 1 / (dmc*(beta(a,b)));
%end

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

return

Contact us