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

truncauchy_pdf(x, a, b, mu, sigma)
% truncauchy_pdf.m - evaluates the Truncated Cauchy Probability Density.  
% See "http://www.math.siu.edu/olive/
% ch4.pdf#search=%22%22chapter%204%22%20%2B%22truncated%20Distributions%22%22" 
%
% Created by:   Jim Huntley,  08/22/02.
%

function [pdf] = truncauchy_pdf(x, a, b, mu, sigma)

coef = 1 / (sigma*(atan(b)+atan(a)));
pdf = coef / (1 + ((x-mu)/sigma)^2);

return

Contact us