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

gent2_pdf(x, p, q)
% gent2_pdf.m - evaluates the Generalized T Probability Density.  
% See "Continuous Univariate Distributions", Johnson, Kotz, & Balakrishnan,
% Wiley, Vol. 2, p. 421, 1995.
%
%  Created by:   Jim Huntley,  02/15/07.
%
%  Vector form of the PDF !!!
%

function [pdf] = gent2_pdf(x, p, q)

pdf = 0.5 .* p ./ (q^(1/p) .* beta(1/p,q) .* (1+((abs(x)).^p)./q).^(q+1/p));

return

Contact us