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_pdf(x, sigma, mu)
% logcauchy_pdf.m - evaluates a Log Cauchy Probability Density.
%   See "Applied Robust Statistics", Chapter 3, D.J. Olive, p. 71.
%   http://www.math.siu.edu/olive/ol-bookp.htm.
%
%   Vector Form of PDF!!!!
%
%   NOTE:   In order to adequately represent the CDF of this distribution
%           numerically, mu should be small <~1 and sigma should be
%           smaller!!!!!!!
%
%  Created by Jim Huntley,  01/20/10
%

function [pdf] = logcauchy_pdf(x, sigma, mu)

%persistent coef

%if(isempty(coef))
    coef = 1 / (sigma*pi);
%end

pdf = coef ./ (x.*(1+((log(x)-mu)./sigma).^2));

return

Contact us