Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates


James Huntley (view profile)


generates random variates from over 870 univariate distributions

% genlogn_cdf.m - compute Generalized Lognormal Distribution Function.
%   See "The Generalized Lognormal Distribution as an Income Distribution", 
%   C. Kleiber and S. Scheid, Dortmund,.               
%               Vector Form of CDF !!!
%  Created by:  Jim Huntley,  10/30/08.

function [cdf] = genlogn_cdf(x,tau,sigma,mu)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;

minx = min(x);

% Integrate PDF to get CDF.
warning off MATLAB:quad:MinStepSize
for jz = 1:size(x,2)
    cdf(jz) = quad(@genlogn_pdf,minx,x(jz),tol,trace,tau,sigma,mu);


Contact us