Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

mrgenbeta_cdf(x, a, b, p, q)
% mrgenbeta_cdf.m - evaluates a McDonald & Richards Generalized Beta Cumulative Distribution.
%   See "Handbook of Beta Distribution and Its Applications", A.K Gupta &,
%   S. Nadarajah, p.118, 2004. 
%
%  Created by Jim Huntley,  03/09/11
%

function [cdf] = mrgenbeta_cdf(x, a, b, p, q)

%persistent coef

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

argx = (x./q).^p;
cdf = coef .* argx .* pfq([a,1-b],a+1,argx);

return

Contact us