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

genpears7_cdf(x,m,c,xi)
% genpears7_cdf.m - compute Generalized Pearson 7 Cumulative Distribution Function.             
% See "Continuous Univariate Distributions", Johnson, Kotz, & Balakrishnan,
% Wiley, Vol. 2, p. 396, 1995.
%
%  Created by:   Jim Huntley,  02/14/07.
%
%  Vector form of the CDF !!!
%

function [cdf] = genpears7_cdf(x,m,c,xi)

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(@genpears7_pdf,minx,x(jz),tol,trace,m,c,xi);
end

return



Contact us