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

bessel2_pdf(x, beta, lambda, theta)
% bessel2_pdf.m - evaluates a Bessel II Probability Density.
%   See "Non-Uniform Random Variates", L. Devroye, Springer-Verlag, 1986, p.469.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  8/20/04
%

function [pdf] = bessel2_pdf(x, beta, lambda, theta)

D = (theta^lambda) * (beta^(1-lambda)) * exp(-0.5*(beta^2)/theta);
sx = size(x,2);

for jx = 1:sx
    pdf(jx) = D * (x(jx))^lambda * exp(-(0.5*theta*(x(jx)).^2)) * besseli(lambda-1,beta*(x(jx)));
end 

return

Contact us