Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

ahuja_pdf(x, mu, rho, phi)
% ahuja_pdf.m - evaluates an Ahuja & Nash Probability Density.
%   See "Continuous Univariate Distributions", vol.2, Johnson, Kotz, & Balakrishnan, 
%   1995, Wiley, p.83.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  9/25/08
%

function [pdf] = ahuja_pdf(x, mu, rho, phi)

%persistent denom

%if(isempty(denom))
    denom = mu * gamma(phi);
%end

exparg = exp(-x ./ mu);
pdf = (rho.*exparg).^phi .* exp(-rho.*exparg) ./ denom; 

return

Contact us