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

hyperbola_cdf(x,alpha,bet)
% hyperbola_cdf.m - evaluates a Hyperbola Cumulative Distribution.
%   See "Non-Uniform Random Deviates", L. Devroye, Chapter 9.
%
%  Created by Jim Huntley,  08/18/06
%
%

function [cdf] = hyperbola_cdf(x,alpha,bet)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;
minx = min(x);

warning off MATLAB:quad:MinStepSize
sz = size(x,2);

for jx = 1:sz
    cdf(jx) = quad(@hyperbola_pdf,minx,x(jx),tol,trace,alpha,bet);
end

return

Contact us