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

diskline_pdf(x, R)
% diskline_pdf.m - evaluates a Disk-Line Probability Density.
%   See "On the Probability Distribution of the Minimal Number of Hops
%   Between any Pair of Nodes in a Bounded Wireless Ad-Hoc Network Subject
%   to Fading", S. Mukherjee and D. Avidor, Lucent.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  7/26/06
%

function [pdf] = diskline_pdf(x, R)

coef = 2 / R^2;
od2r = 1 / (2*R);
sx = size(x,2);

pdf = coef .* x .* ( 1 - 2.*(asin(x.*od2r)+ x.*od2r.*sqrt(1 - (x.*od2r).^2))./pi);

return

Contact us