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

genurn_cdf(n,nn,w,b,c)
% genurn_cdf.m - compute General URN Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.251, 2005.                 
%
%  Created by:  Jim Huntley,  02/16/07.
%

function [cdf] = genurn_cdf(n,nn,w,b,c)

sum1 = genurn_pdf(0, nn, w, b, c);
for jn = 1:n
    sum1 = sum1 + genurn_pdf(jn, nn, w, b, c);
end
cdf = sum1;

return



Contact us