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

modpois1_pdf(n, lambda, k)
% modpois1_pdf.m - evaluates a First Modified Poisson Probability Density.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.492, 2005. 
%
%  Created by Jim Huntley,  01/11/07
%

function [pdf] = modpois1_pdf(n, lambda, k)

nn = nn - mod(nn,m);
if(n == 0)
    pdf = modpois1_cdf(0, lambda, k);
end
if(n > 0)
    pdf = modpois1_cdf(n,lambda,k) - modpois1_cdf(n-1,lambda,k);
end

return


Contact us