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

nakaq_pdf(x, sigma, q)
% nakaq_pdf.m - evaluates a Nakagami-q Probability Density.
%   See "Unified Performance Bounds for Generalized Selection Diversity
%   Combining in Independent Generalized Fading Channels", 
%   Y. Chen et al., U. Alberta, Can. J. Elec. Comput. Eng., Vol 29, No. 1/2,
%   April, 2004. 
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  9/18/06
%

function [pdf] = nakaq_pdf(x, sigma, q)

b = (1-q^2) / (1+q^2);
term = sigma * (1-b^2);
coef = 1 / (sigma*sqrt(term));

pdf = coef .* exp(-x./term) .* besseli(0,b.*x./term);

return

Contact us