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

scalchi_cdf(x,k,sigma)
% scalchi_cdf.m - compute Scaled Chi 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/22/10.
%

function [cdf] = scalchi_cdf(x,k,sigma)

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

return



Contact us