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

range_pdf(x)
% 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 

%if(isempty(coef))
    coef = 2 / (1-2*besselk(1,2));
%end

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

return

Contact us