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

ncgamma_pdf(x, alpha, theta)
% ncgamma_pdf.m - evaluates a Non-Central Gamma Probability Density.
%   See "Continuous Univariate Distributions", v.2, Johnaon, Kotz, and Balakrishnan,
%   J. Wiley, 1995, p.456.
%   Vector Form of PDF !!!
%  Created by Jim Huntley,  7/30/07

function [pdf] = ncgamma_pdf(x, alpha, theta)

pdf = exp(-theta-x) .* (x./theta).^(0.5*(alpha-1)) .* besseli(alpha-1,2.*sqrt(theta.*x));    


Contact us