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

hoskwal_pdf(x, c, k)
% hoskwal_pdf.m - evaluates a Hosking & Wallis Generalized Pareto Probability Density.
%   See "Continuous Univariate Distributions", Johnson, Kotz, & Balakrishnan, 
%   J. Wiley, V. 1, p. 614, 1995.
%
%  Created by Jim Huntley,  3/14/07
%

function [pdf] = hoskwal_pdf(x, c, k)

if(c == 0)
    pdf = exp(-x/k) / k;
else
    pdf = (1 - c*x/k)^(1/c-1) / k;
end

return

Contact us