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

strchexp_cdf(x,bet,theta,xtrem)
% strchexp_cdf.m - compute Stretched Exponential Cumulative Distribution Function.
%   See "The Amoroso Distribution", G. E. Crooks, Tech. Note 003v5 (2010-01-14)
%   http://threeplusone.com/pubs/technote/CrooksTechNote003.pdf.              
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  2/17/10.
%

function [cdf] = strchexp_cdf(x,bet,theta,xtrem)

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(@strchexp_pdf,minx,x(jz),tol,trace,bet,theta,xtrem);
end

return



Contact us