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

wirelength_cdf(x, a)
% wirelength_cdf.m - evaluates a Wire Length cumulative distribution.
%   See " The Analytical Form of the Length Distribution Function 
%   for Computer Interconnects", J. E. Cotter and P. Christie,
%   IEEE Trans. on Circuits and Systems, Vol. 38, No. 3, March, 1991.
%
%   Created by: J. Huntley,  10/20/06
%

function [cdf] = wirelength_cdf(x, a)

coef = 1/(18*a^4);

if(x <= a)
    cdf = coef * 0.25*(-3*x^4 + 16*a*x^3 + 6*x^2);
elseif(x > a && x <= 2*a)
    cdf = coef * (10*a^4 - 0.5*13*a^2 + 1.25*x^4 - 12*a*x^3 ...
                  + 0.5*(72*a^2-5)*x^2 - 32*a^3*x + 8*a*x);
else
    cdf = coef * (-46*a^4 + 0.5*11*a^2 - 0.25*x^4 + 4*a*x^3 ...
                  - 24*a^2*x^2 + 0.5*x^2 + 64*a^3*x - 4*a*x);
end

return;

Contact us