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

trungeom_pdf(n, alpha, K)
% trungeom_pdf.m - evaluates a Truncated geometric Probability Density.
%   See "Collision-Minimizing CSMA and Its Applications to Wireless Sensor Networks", 
%   Y. C. Tay et al, IEEE Jour. Selected Areas in Comm., Vol. 22, No. 6, aug., 2004.
%
%  Created by Jim Huntley,  08/24/06
%
%

function [pdf] = trungeom_pdf(n, alpha, K)

pdf = (1-alpha) * alpha^K * alpha^(-n) / (1-alpha^K);

return

Contact us