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

ferreri_cdf(x, a, b, c, mu)
% ferreri_cdf.m - compute Ferreri Cumulative Distribution Function.
%   See "Non-Uniform Random Deviates", L. Devroye, McGill, p. 482.               
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  07/15/05.
%

function [cdf] = ferreri_cdf(x, a, b, c, mu)

tol = 1e-10;
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(@ferreri_pdf,minx,x(jz),tol,trace,a,b,c,mu);
end

return



Contact us