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

voda_pdf(x, theta, k)
% voda_pdf.m - evaluates a Voda Probability denisity.
%   See " Continuous Univariate Distributions", Johnson, Kotz and Balakrishnan,
%   J. Wiley, v.1, p.479, 1995. 
%
%   Created by  J. Huntley,  10/18/07.
%
%   Vector form of PDF!!!
%

function [pdf] = voda_pdf(x, theta, k)

% Evaluate PDF.
%pdf = 2 .* theta.^(k+1) .* x.^(2*k+1) .* exp(-theta.*x.^2) ./ gamma(k+1);
pdf = 2 .* exp((k+1)*log(theta) + (2*k+1).*log(x) - theta.*x.^2 - gammaln(k+1));

return


    

Contact us