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

dtrpois_cdf(n,theta,r1,r2)
% dtrpois_cdf.m - compute a Doubly Truncated Poisson Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp & Kotz,
%   J. Wiley, p.137, 2005. 
%
%  Created by Jim Huntley,  01/03/07
%

function [cdf] = dtrpois_cdf(n,theta,r1,r2)

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

return



Contact us