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

rtpois_cdf(n, theta, r2)
% rtpois_cdf.m - compute Right-Truncated Poisson Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.192, 2005.                 
%
%  Created by:  Jim Huntley,  10/01/07.
%

function [cdf] = rtpois_cdf(n, theta, r2)

sum1 = rtpois_pdf(0, theta, r2);
for jn = 1:n
    sum1 = sum1 + rtpois_pdf(jn, theta, r2);
end
cdf = sum1;

return



Contact us