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

disnorm_cdf(n, nmin, sigma, nmax)
% disnorm_cdf.m - compute Discrete Normal Cumulative Distribution Function.
%   See "Generating Non-Uniform Random Variates", Chap. 3, L. Devroye
%
%  Created by:  Jim Huntley,  09/11/06.
%

function [cdf] = disnorm_cdf(n, nmin, sigma, nmax)

sum1 = 0;
for jn = 1:n-nmin+1
    sum1 = sum1 + disnorm_pdf(jn+nmin-1, nmin, sigma, nmax);
end
cdf = sum1;
    
return



Contact us