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

rtpois_cdf(n, n0, n1)
% runs_cdf.m - compute Runs (Ising-Stevens) Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.451, 2005.                 
%  Created by:  Jim Huntley,  10/01/07.

function [cdf] = rtpois_cdf(n, n0, n1)

sum1 = runs_pdf(0, n0, n1);
for jn = 1:n
    sum1 = sum1 + runs_pdf(jn, n0, n1);
cdf = sum1;


Contact us