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

ptad_pdf(x, theta, gam, N)
% ptad_pdf.m - evaluates a Power tail Probability Density.
%   See "Performance of Class-Based Queues with Self-Similar Traffic"
%   J. Orellana et al., University College London.
%
%  Created by Jim Huntley,  07/24/06
%

function [pdf] = ptad_pdf(x, theta, gam, N)

M = (1-theta) / (1 - gam*theta);
G = (1-theta) / (1 - theta^N);
ratio = theta/gam;
sum1 = 0;

for jn = 1:N
    sum1 = sum1 + ratio^(jn-1) * exp(-M*x/gam^(jn-1));
end
pdf = M * G * sum1;

return

Contact us