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

gencauchy_pdf(x, a)
% gencauchy_pdf.m - evaluates a Generalized Cauchy Probability Density.
%   See "Non-Uniform Random Deviates", L. Devroye, Chapter 9.
%
%  Created by Jim Huntley,  08/18/06
%
%  Vector Form of the PDF!!!
%

function [pdf] = gencauchy_pdf(x, a)

coef = 0.5 * a * sin(pi/a) / pi;

pdf = coef ./ (1 + abs(x).^a);

return

Contact us