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

normmom_cdf(x, alpha)
% normmom_cdf.m - evaluates a Normal Moment Cumulative Distribution.
%   See "On the Normal Moment Distributions", A. Olosunde,
%   http://interstat.statjournals.net/YEAR/2007/articles/0706001.pdf.
%
%   Vector form of CDF!
%
%   Created by Jim Huntley,  12/02/09
%

function [cdf] = normmom_cdf(x, alpha)

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(@normmom_pdf,minx,x(jz),tol,trace,alpha);
end

return

Contact us