Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

carlitz1(n, m, x)
% carlitz1.m - evaluates the Stirling-Carlitz Type 1 polymonial coefficients.
%   See "The r-Stirling Numbers", Andrei Z. Broder, Stanford, December, 1982, eq. 58.
%
%   Created by: J. Huntley,  01/05/07
%
%   Calls:  'stirling1.m'
%

function [r1] = carlitz1(n, m, x)

sumi = 0;
for ji = 1:n-m+1
    sumi = sumi + binomial_coef(m+ji-1,m) * stirling1(n,m+ji-1) * x^(ji-1);
end
r1 = sumi;

return

Contact us