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

malik3_pdf(x, a, n, k)
% malik3_pdf.m - evaluates a Malik 3 Probability Density.
%   See "Continuous Univariate Distributions", v.1, Johnson, Kotz, & Balakrishnan,
%   J. Wiley, 1995, p.349.
%
%   Vector Form of PDF !!!
%
%  Created by Jim Huntley,  7/09/07
%

function [pdf] = malik3_pdf(x, a, n, k)

%persistent coef 

%if(isempty(coef))
    coef = exp(n*log(a) + n*log(n) - log(k) -gammaln(n)); 
%end

arg = x ./ k;
pdf = coef .* exp(-(1+a.*n).*log(arg)) .* (log(arg)).^(n-1);

return

Contact us