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

sobolevqr_pdf(x, p, q, r)
% sobolevqr_pdf.m - evaluates a Sobolev q-r Probability Density.
%   See "Continuous Univariate Distributions", vol. 2, Johnson, Kotz, &
%   Balakrishnan, J. Wiley, 1996, p.650.
%
%   Vector form of PDF!
%
%   Created by Jim Huntley,  12/02/09
%

function [pdf] = sobolevqr_pdf(x, p, q, r)

%persistent coef

%if(isempty(coef))
    coef = abs(q) * exp(q*log(p) - gammaln(1+0.5*q*r));
%end

pdf = coef .* x.^(q-1) .* exp(-(p.*x).^(2/r));

return

Contact us