Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

generates random variates from over 870 univariate distributions

leipnik_cdf(x,lambda, mu)
% leipnik_cdf.m - compute Leipnik Cumulative Distribution Function.
%   See "VGAM Family Functions for Univariate Distributions", Beta Version 0.5-15,
%   T. W. Yee, Univserity of Aukland, 1/06/2004.              
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  03/30/05.
%

function [cdf] = leipnik_cdf(x,lambda, mu)

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(@leipnik_pdf,minx,x(jz),tol,trace,lambda,mu);
end

return



Contact us