Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

% tardon2_cdf.m - compute Tardon 2 Beta Cumulative Distribution Function.
%   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 CDF.
%  Created by Jim Huntley,  12/30/09.

function [cdf] = tardon2_cdf(x,a,b,lambda)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;

minx = min(x);

% Integrate PDF to get CDF.
warning off MATLAB:quad:MinStepSize
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = quad(@tardon2_pdf,minx,x(jz),tol,trace,a,b,lambda);


Contact us