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

pearson12_cdf(x,a,b,c)
% pearson12_cdf.m - evaluates a Pearson XII Cumulative Distribution.
%   See "Non-Uniform Random Deviates", L. Devroye, Chapter 9.
%
%  Created by Jim Huntley,  08/18/06
%
%

function [cdf] = pearson12_cdf(x,a,b,c)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;
minx = min(x);

warning off MATLAB:quad:MinStepSize
sz = size(x,2);

for jx = 1:sz
    cdf(jx) = quad(@pearson12_pdf,minx,x(jx),tol,trace,a,b,c);
end

return

Contact us