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

volodin_pdf.m
% volodin_pdf.m - evaluates a Volodin Generalized Beta Probability Density.
%   "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 [pdf] = volodin_pdf(x, alpha, bet, gam)

% Initiailizations.
bet1 = beta(alpha + bet, gam);
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-1);        
    arg(jz) = zgamomza * xmzbet;
end

% Calulate PDF.
pdf = real(bet * simps(z,arg) / bet1);

return

Contact us