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

match_cdf(n, nn)
% match_cdf.m - compute a Matching Cumulative Distribution Function.
%   See "Generating Non-Uniform Random Variates", Chap. 10, L. Devroye
%  Created by:  Jim Huntley,  09/06/06.

function [cdf] = match_cdf(n, nn)

sum1 = match_pdf(0, nn);
for jn = 1:n
    sum1 = sum1 + match_pdf(jn, nn);
cdf = sum1;

Contact us