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

fermdir_cdf(n, b, c)
% fermdir_cdf.m - compute Fermi Dirac Counting Cumulative Distribution Function.
%   See "Univariate Discrete Distributions", Johnson, Kemp, and Kotz,
%   J. Wiley, p.445, 2005.                  
%  Created by:  Jim Huntley,  01/11/07.

function [cdf] = fermdir_cdf(n, b, c)

sum1 = fermdir_pdf(0, b, c);

for jn = 1:n
    sum1 = sum1 + fermdir_pdf(jn, b, c);

cdf = sum1;


Contact us