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

tardon2_pdf(x, a, b, lambda)
% tardon2_pdf.m - evaluates a Tardon 2 Beta Probability denisity.
%   See "On the PDF of the Disparity Gradient", S. Nadrajah and S. Kotz, 
%   IEEE Transactions on Systems Management and Cybernetics - Part A
%   Systems and Humans, Vol. 38, No. 1, Jan. 2008.
%
%   Vector Form of PDF.
%
%  Created by Jim Huntley,  12/30/09.
%

function [pdf] = tardon2_pdf(x, a, b, lambda)

%^persistent coef

%if(isempty(coef))
    coef = a / (lambda*(b-1));
%end

for jx = 1:size(x,2)
    subscrp = lambda * x(jx) / (1 - x(jx) + lambda*x(jx));
    pdf(jx) = coef .* betainc(subscrp,a+1,b-1) / (x(jx))^2;
end

return


    

Contact us