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

diskline_cdf(x,R)
% diskline_cdf.m - compute Disk-Line Cumulative Distribution Function.
%   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 CDF !!!
%
%  Created by:  Jim Huntley,  07/24/06.
%

function [cdf] = diskline_cdf(x,R)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;

minx = min(x);

% Integrate PDF to get CDF.
warning off MATLAB:quad:MinStepSize
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = quad(@diskline_pdf,minx,x(jz),tol,trace,R);
end

return



Contact us