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

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

%if(isempty(coef))
%   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;
%end

pdf(jx) = coef ./ (x(jx).*x(jx) + gamsq).^(theta/2);    

return

Contact us