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

parnprod2_cdf(x,nn,a,k)
% parnprod2_cdf.m - compute Pareto n Product 1 Cumulative Distribution Function.
%   See "Continuous Univariate Distributions", Vol.1, Johnson, Kotz
%   and Balakrishnan, p.605, 1995.
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  04/08/09.
%

function [cdf] = parnprod2_cdf(x,nn,a,k)

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(@parnprod2_pdf,minx,x(jz),tol,trace,nn,a,k);
end

return



Contact us