Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley


generates random variates from over 870 univariate distributions

trunpois_cdf(n, m, nn, lambda)
% trunpois_cdf.m - evaluates a Trucated Poisson Cumulative Distribution.
%   See "The Mathematical Gazette", 1983, p. 216.  
%  Created by Jim Huntley,  08/31/11

function [cdf] = trunpois_cdf(n, m, nn, lambda)

sum1 = 0;
    for jn = m:n
        sum1 = sum1 + trunpois_pdf(jn, m, nn, lambda);
cdf = sum1;


Contact us