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

arf_cdf(n, nn, k)
% arf_cdf.m - compute Arfwedson Cumulative Distribution Function.
%   See "Generating Non-Uniform Random Variates", Chap. 10, L. Devroye
%  * NOTE THAT THIS "CDF" IS NOT NORMALIZED !!! 
%    (just a brute-force sum of the PDF).
%
%  Created by:  Jim Huntley,  09/07/06.
%

function [cdf] = arf_cdf(n, nn, k)

sum = arf_pdf(0, nn, k);
for jn = 1:n
    sum = sum + arf_pdf(jn, nn, k);
end
cdf = sum;
    
return



Contact us