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

kummer_cdf(x,alpha,bet,gamm,delta)
% kummer_cdf.m - evaluatess a Kummer Probability Density.
%   See "Continuous Univariate Distributions", Johnson, Kotz, and Balakrishnan,
%   J. Wiley, v.2, 1995, 648. 
%
%   Vector Form of the CDF!!!
%
%  Created by Jim Huntley,  6/22/07
%

function [cdf] = kummer_cdf(x,alpha,bet,gamm,delta)

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(@kummer_pdf,minx,x(jz),tol,trace,alpha,bet,gamm,delta);
end

return



Contact us