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

laha_cdf(x)
% laha_cdf.m - evaluates a Laha Cumulative Distribution.
%   See "Generating Non-Uniform Random Variates", Chap. 9, L. Devroye.
%
%  Created by Jim Huntley,  09/07/06
%
%

function [cdf] = laha_cdf(x)

cdf = 0.5 * (log((x^2+sqrt(2)*x+1)/(x^2-sqrt(2)*x+1)) + 2*atan2(sqrt(2)*x,1-x^2)) / pi;

return

Contact us