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

genlogser_cdf(n, b, p)
% genlogser_cdf.m - compute Generalized Logarithmic Series Cumulative Distribution Function.
%   See "Generating Non-Uniform Random Variates", Chap. 10, L. Devroye
%
%  Created by:  Jim Huntley,  03/03/08.
%

function [cdf] = genlogser_cdf(n, b, p)

sum1 = 0;
for jn = 1:n
    sum1 = sum1 + genlogser_pdf(jn, b, p);
end
cdf = sum1;
    
return



Contact us