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

kdist_cdf(x, c, nu)
% kdist_cdf.m - evaluates a Cumulative K-Distribution.
%   See "Non-linear Interference ...", Ponnekanti & Sali, PIER 18, 209 (1998).
%
%  Created by Jim Huntley,  10/13/03.
%

function [cdf] = kdist_cdf(x, c, nu)

%persistent ltcnu gamlnnu 

%if(isempty(ltcnu))
    ltcnu = log(2 * c^nu);
    gamlnnu = gammaln(nu);
%end

arg = 2*c*x;
cdf = 1 - exp(ltcnu + log(x^nu * besselk(nu,arg)) - gamlnnu);

return

Contact us