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

mckay1_pdf(x, a, b, c)
% mckay1_pdf.m - evaluates a McKay I Probability Density.
%   See "Sum & Difference of 2 Squared Correlated Nakagami Variates
%   in Connection with the McKay Distribution", H. Holm & M-S Alouini,
%   IEEE Trans. Comm., Vol. 52, No. 8, August 2004, p. 1368.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  03/31/05
%

function [pdf] = mckay1_pdf(x, a, b, c)

D = sqrt(pi) * (c^2 - 1)^(a+0.5) / (2^a * b * gamma(a+0.5));
arg = x ./ b;
pdf = D .* arg.^a .* exp(-c.*arg) .* besseli(a,arg);

return

Contact us