Generation of Random Variates
09 Feb 2012
generates random variates from over 870 univariate distributions
|hall_pdf(x, theta, gama)
% hall_pdf.m - evaluates a Hall Probability Density.
% See "Wideband HF Noise and Interference Modeling",
% J. J. Lemmon, NTIA, Dept. of Commerce, IEEE, 1989.
% Vector Form of PDF !!!
% Created by Jim Huntley, 7/11/06
function [pdf] = hall_pdf(x, theta, gama)
%persistent coef gamsq
% coef = gamma(theta/2) * gama^(theta-1) / (gamma((theta-1)/2) * sqrt(pi));
coef = exp(gammaln(theta/2) + log(gama^(theta-1)) - (gammaln((theta-1)/2) + log(sqrt(pi))));
gamsq = gama * gama;
pdf(jx) = coef ./ (x(jx).*x(jx) + gamsq).^(theta/2);