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

ncnegbin_cdf(n,a,lambda,ups)
% ncnegbin_cdf.m - compute Non-Central negative Binomial Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.242, 2005.                 
%
%  Created by:  Jim Huntley,  7/31/07.
%

function [cdf] = ncnegbin_cdf(n,a,lambda,ups)

sum1 = ncnegbin_pdf(0,a,lambda,ups);
for jn = 1:n
    sum1 = sum1 + ncnegbin_pdf(jn,a,lambda,ups);
end
cdf = sum1;

return



Contact us