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

malik4_pdf(x, a, p, k)
% malik4_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,  11/20/09
%

function [pdf] = malik4_pdf(x, a, p, k)

%persistent coef 

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

pdf = coef .* x.^(-a*p-a-1) .* (1 - k^a./x.^a).^p;

return

Contact us