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

jvp_cdf(x)
% jvp_cdf.m - compute a Jackson-de la Vallee Pousin Cumulative Distribution.
%   See "Generating Nonuniform Random Variates", Chap., 4, L. Devroye.
%
%  Created by:  J. Huntley,  09/08/06.
%

function [cdf] = jvp_cdf(x)
     
cdf = (-sin(x)^3 * (sin(x)+2*x*cos(x)) / x^3 - cos(2*x)/x - 2*sinint(2*x) ...
      + cos(4*x)/x + 4*sinint(4*x)) / pi;

return
     

Contact us