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

logcauchy_cdf(x,sigma,mu)
% logcauchy_cdf.m - compute Logarithmic Cauchy Cumulative Distribution Function.
%   See "Applied Robust Statistics", Chapter 3, D.J. Olive, p. 71.
%   http://www.math.siu.edu/olive/ol-bookp.htm.               
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  01/20/10.
%

function [cdf] = logcauchy_cdf(x,sigma,mu)

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

return



Contact us