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

gencauch2_pdf(x, lambda, k, h, theta)
% gencauch2_pdf.m - evaluates a Generalized Cauchy 2 Probability Density.
%   See "Continuous Univariate Distributions", Johnson, Kemp, & Balakrishnan, 
%   Wiley, v.1, p.327, 1995.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  1/30/07
%

function [pdf] = gencauch2_pdf(x, lambda, k, h, theta)

%persistent coef

%if(isempty(coef))
    coef = 0.5 * k * gamma(h) / (lambda * gamma(1/k) * gamma(h-1/k));
%end

pdf = coef  ./ (1 + (abs((x-theta)./lambda)).^k).^h;


return

Contact us