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

genbeta3p_cdf(x,a1,a2,lambda)
% genbeta3p_cdf.m - compute Generalized beta 3-Parameter Cumulative Distribution Function.
%   See "Continuous Univariate Distributions", Johnson, Kotz & Balakrishnan,
%   Vol. 2, J. Wiley, 1995, p.251.             
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  10/20/08.
%

function [cdf] = genbeta3p_cdf(x,a1,a2,lambda)

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

return



Contact us