Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

% range_pdf.m - evaluates a Range Probability Density.
%   See "Continuous Univariate Distributions", Johnson, Kotz, and Balakrishnan,
%   J. Wiley, v.2, p.87, 1995.
%  Created by Jim Huntley,  9/28/07
% Note that normalized has been applied to this function!!!

function [pdf] = range_pdf(x)

%persistent coef 

    coef = 2 / (1-2*besselk(1,2));

pdf = coef * exp(-x) * besselk(0,2.*exp(-0.5.*x));


Contact us