Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates



generates random variates from over 870 univariate distributions

negbin1_cdf(n, lambda, P)
% negbin1_cdf.m - compute Negative Binomial 1 Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.483, 2005.                 
%  Created by:  Jim Huntley,  07/17/07.

function [cdf] = negbin1_cdf(n, lambda, P)

sum1 = negbin1_pdf(0, lambda, P);
for jn = 1:n
    sum1 = sum1 + negbin1_pdf(jn,lambda, P);
cdf = sum1;


Contact us