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

volodin_cdf.m
% volodin_cdf.m - evaluates a Volodin Generalized Beta Cumulative Distribution.
%   "Correspondence On the PDF of the Disparity Gradient", 
%   Saralees Nadarajah and Samuel Kotz, IEEE TRANSACTIONS ON SYSTEMS,
%   MAN, AND CYBERNETICSPART A: SYSTEMS AND HUMANS, VOL. 38, NO. 1, JANUARY 2008.
%
%  Created by Jim Huntley,  01/18/07
%

function [cdf] = volodin_cdf(x, alpha, bet, gam)

% Initiailizations.
bet1 = beta(alpha + bet, gam);
nz = 100;
nz = 1000;
dz = x / (nz-1);
for jz = 1:nz
    z(jz) = dz * (jz-1);
    zgamomza = z(jz)^(gam-1) * (1-z(jz))^(alpha-1);
    xmz = x - z(jz);
    xmzbet = xmz^bet;        
    arg(jz) = zgamomza * xmzbet;
end

% Calulate CDF.
cdf = real(simps(z,arg) / bet1);

return

Contact us