Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

caubirnsan_pdf(x, alpha, bet)
% caubirnsan_pdf.m - evaluates a Cauchy Birnbaum Sanders Probability Density.
%   See "A New Family of Life Distributions Based on Birnbaum-Sanders
%   Distribution", J.A. Diaz-Garcia and V. Leiva-Sanchez,
%   http://www.cimat.mx/reportes/enlinea/I-02-17.pdf.
%
%   Vector Form of PDF!!!
%
%   Created by Jim Huntley,  12/10/09
%

function [pdf] = caubirnsan_pdf(x, alpha, bet)

%persistent coef

%if(isempty(coef))
    coef = 1 / (2*pi*alpha*sqrt(bet));
%end

argx = (x./bet + bet./x - 2);
pdf = coef .* (x+bet) ./ (x.^1.5 .* (1+argx./alpha^2));

return

Contact us